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.
