I request you to add to for instructions article “Sample Usecase - Getting Custom Attributes For Active Directory User and parsing the attributes using the JSON Parser node”, the note, that ActiveDirectory cmdlets work only if the configured target server is a domain controller.
I spend almost a whole day to find out the ActiveDirectory cmdlets in a PowerShell remote session only work when the target server is a Domain Controller. Also, if the ActiveDirectory Module is installed correctly on a server and the commands work locally, in a PSSession they won’t work.
Please reproduce that for yourselves.
Here I’m on a standard domain member server, without Domain Controller role:
Commands are working locally
Commands won’t work when connecting with a RemoteSession to the localhost:
Here I’m on a Domain Controller; commands are working in RemoteSession
Therefore the Orchstration Powershell App needs to have a Domain Controller as target configured to make the commands work you are showing in your article. Otherwise you receive the exact same error as result: