Using the Active Directory module - assistance required

I'm trying to convert appropriate Orchestrator runbooks to Cireson PowerShell Activities. When it's internal to SCSM, I am having no issues, but when I need to use the ActiveDirectory module, it doesn't seem to work no matter how I structure it.

I note the format of the script during no longer exists (39:56) remotes to the DC. As we do not have remote PS rights to our DCs, I can't figure out how else to make this work.
 


The error we get when we try using $env:COMPUTERNAME in place of the $DC variable is:
Unable to contact the server. This may be because this server does not exist, it is currently down, or it does not have the Active Directory Web Services running.

Of course, I have installed AD Web Services on this machine and it works perfectly well using PowerShell ISE.

The original runbook had encrypted credentials and remoted to another server using credssp, but using certs to encrypt our credentials is a bit of a pain.

How can I get this script to work in CPA?
7 replies