Hi,
Runbooks executed with Runbook Server(s) with the logon account of the "Orchestrator Runbook Service". Perhaps the Powershell-Module with the cmdlet is not vailable on the Runbook Server or the locon account ($env:PSModulePath)?
It will help to help you when you inform wich xersion of Orhestrator and which cmdlet you want to use, because:
- Orchestrator Runbooks are executed with Windows PowerShell (Version 5.x) and not with PowerShell Core (Version 6.x and above).
- In version 2016 and below of SC Orchestrartor: Runbooks are executed in 32bit environment and with Powershell Version 2.0 per default. You can force to use the latest Version in registry with with OnlyUseLatestCLR in path HKLM\SOFTWARE\Wow6432Node\Microsoft.NETFramework.
- In version 2019 and below Runbooks are executed in 32bit enivronment. Perhaps you cmdlet ist only availbale for 64bit?
Regards,
Stefan