Question

Hi does anyone have any experience of how to get the Active Directory module to work in a remote ps session? Nothing I'm trying seems to work. My remoting between the computers are fine and working and they are joined to a domain. Lets say I do this

$Session = New-PSSession -ComputerName DC01
Invoke-Command -Session $Session {Import-Module Active Directory}
WARNING: Error initializing default drive: '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.'.

If I logon to the server directly it works fine. Tried creating a SessionConfiguration also and told it to load the AD module but no luck there either.

Was it helpful?

Solution 2

I found the solution to my problem. I enabled CredSSP on the server again from scratch and on my client and now it's working :)

OTHER TIPS

May be the dreaded "double hop authentication" problem. Since you already have a Session Configuration set up, you can try adding -RunAs to that and see if it starts working:

http://www.vinithmenon.com/2012/11/delegated-administration-in-windows.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top