Forum Discussion
Aaron Hall
Apr 16, 2019Brass Contributor
[QUESTION] How to Run PowerShell Scripts from WAC connection to Server?
OK, this one I'm not filing as a bug, because I know it's just my own unfamiliarity with PowerShell through remote sessions, but maybe someone can point me in the right direction... I have a serv...
Jeff Woolslayer
Apr 17, 2019Former Employee
Unfortunately the Active Directory cmdlets don’t work in a remote PowerShell session, which is what WAC uses for the console on the machine you are managing.
Outside of WAC, if you open your local PowerShell console to connect like this:
Enter-PSSession ADUTIL
Then try the same script you were using in WAC, you should see the same errors.
The root cause of the AD cmdlets throwing this error in a remote session is referred to as the “double-hop” problem.
You are on LAPTOP, connected to ADUTL. When you run a AD cmdlet, that cmdlet is making a remote call to the DC (the second “hop”), which requires authentication. In this example, in the default configuration, there is no way for your credentials to get from LAPTOP to DC.
Aaron Hall
Apr 24, 2019Brass Contributor
Understood.... so I need a means of gathering the credentials and passing them through, providing the commands I'm using can support this. I think I saw a few other forum posts elsewhere discussing this, so I'll see what I can find based on that. Thanks for the response!