powershell 测试tridion-powershell-modules

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了powershell 测试tridion-powershell-modules相关的知识,希望对你有一定的参考价值。

# This test can be run straigt from the tridion-powershell-modules repository folder
# Put this script in tridion-powershell-modules\CoreService\Tests

# Install the module
& (Join-Path -Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath "..\Installation\Install-Local.ps1")

# Stop on any errors
$ErrorActionPreference = "Stop";

# Optionally set the CoreService version and credentials
Set-TridionCoreServiceSettings -Version 2013-SP1
Set-TridionCoreServiceSettings -UserName "optional-domain\user" -Password "password"

# Do some suff with the Core Service, under the hood this will call Get-TridionCoreServiceClient
$user = Get-TridionUser -Verbose
Write-Host -ForegroundColor Yellow ("The current user is {0}" -f $user.Title)

$publications = Get-TridionPublications -Verbose
Write-Host -ForegroundColor Yellow ("There are {0} publications" -f $publications.Count)

Write-Host -ForegroundColor Green "Test passed"

以上是关于powershell 测试tridion-powershell-modules的主要内容,如果未能解决你的问题,请参考以下文章

powershell 测试tridion-powershell-modules

powershell 测试tridion-powershell-modules

powershell 使用powershell创建用于测试SQL的Azure VM

如何测试 Notepad++ 是不是通过 powershell 安装?

powershell 性能测试小脚本

powershell 此示例在powershell中运行C#代码。我需要这个,当有一部分代码要测试但它只能在p中测试