To use this function add it to the class library file named OrchestratorService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: OrchestratorService.ts
Description: Orchestrator Function to Copy of add a PowerShell Host
Function: PowerShellHostCreate
publicPowerShellHostCreate(strName:string,strFQDN:string,strUsername:string,strPassword:string):PowerShellHost{
//@ts-ignore
letobjPowerShellHostConfig:PowerShellHostConfig=newPowerShellHostConfig();
objPowerShellHostConfig.name=strName;
objPowerShellHostConfig.type="WinRM";
objPowerShellHostConfig.connectionURL=strFQDN;
objPowerShellHostConfig.transportProtocol="HTTPS"
objPowerShellHostConfig.port="5985";
objPowerShellHostConfig.username=strUsername;
objPowerShellHostConfig.password=strPassword;
objPowerShellHostConfig.authentication="Kerberos";
//@ts-ignore
objPowerShellHostConfig.authorizationMode=PowerShellAuthorizationMode.fromString("Shared Session");
letobjPowerShellHost:PowerShellHost=PowerShellHostManager.update(objPowerShellHostConfig);
returnobjPowerShellHost;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
