Orchestrator Workflow Action to Add a PowerShell Host

by Simon Sparks · 1 May 2013

The following script adds a PowerShell Host

var objPowerShellHostConfig = new PowerShellHostConfig();
	objPowerShellHostConfig.name = "psh.cloudbuildtools.com";
	objPowerShellHostConfig.type = "WinRM";
	objPowerShellHostConfig.connectionURL = "psh.cloudbuildtools.com";
	objPowerShellHostConfig.transportProtocol = "HTTP"
	objPowerShellHostConfig.port = "5985";
	objPowerShellHostConfig.username = "orchestrator@cloudbuildtools.com";
	objPowerShellHostConfig.password = "P@ssw0rd1!";
	objPowerShellHostConfig.authorizationMode = PowerShellAuthorizationMode.fromString("Shared Session");
	objPowerShellHostConfig.authentication = "Kerberos";

try
{
	objPowerShellHostConfig = PowerShellHostManager.update(objPowerShellHostConfig);
}
catch ( objException )
{
	System.log ( objException );
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like