Hey All,
I have a interesting problem with running powershell script from Orchestrator. First thing first I have vRO v8.6.
Here are the some configurations,
- I added a powershell host to vRO no issue there.
- I can run most of the script that requires vCenter
issue,
- I cannot run any content library powercli commands. please see example below. If I login to server directly with same account that I added my powershell host to vRO, I can run the script just fine.
Connect-VIServer vcenter -User $username-Password $password
Get-ContentLibraryItem
I get error below.
ERROR(com.vmware.library.powershell/invokeScript) Error in (Dynamic Script Module name : invokeScript#15) PowerShellInvocationError: Errors found while executing script Get-ContentLibraryItem : 7/11/2022 3:43:58 PM Get-ContentLibraryItem An error occurred while trying to get content libraries by names. For more details check the inner exception.
Thanks,
Haluk
Which version of PowerCLi version you are using, try using the latest PowerCLI version.
current version of my powershell is,
Name Value
---- -----
PSVersion 5.1.17763.2931
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.2931
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
See if you are on the latest PowerCLI version,
check it with Get-PowerCLIVersion and see if you can upgrade to the latest version if you are an older version.