locked
Unable to use Power Shell AD cmdlets on Remote Server RRS feed

  • Question

  • 1.Enter-PSSession

    PS C:\Users\09094080> Enter-PSSession -ComputerName 'oadb1' -Credential 'quantacn\qsmcoa'
    [oadb1]: PS C:\Users\qsmcoa\Documents>

    2.Import-Module ActiveDirectory

    [oadb1]: PS C:\Users\qsmcoa\Documents> Import-Module ActiveDirectory
    警告: 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.'.
    [oadb1]: PS C:\Users\qsmcoa\Documents>

     3. run the Active Directory WebServices

    [oadb1]: PS C:\Users\qsmcoa\Documents> Import-Module ActiveDirectory
    [oadb1]: PS C:\Users\qsmcoa\Documents>

    4. Get-ADUser  throw exception.

    Whey? What can I do?

    [oadb1]: PS C:\Users\qsmcoa\Documents> Import-Module ActiveDirectory
    [oadb1]: PS C:\Users\qsmcoa\Documents> Get-ADUser '09094080'
    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.
        + CategoryInfo          :
        + FullyQualifiedErrorId : Unable to contact the server. This may be because this server does not exist, it is curr
       ently down, or it does not have the Active Directory Web Services running.,Microsoft.ActiveDirectory.Management.Co
      mmands.GetADUser

    Friday, April 13, 2012 4:26 AM

Answers

  • It doesn't appear that there is an answer forthcoming from this forum.  I hope you were able to resolve this issue by some other means.

    Kevin


    Kevin Remde US DPE - IT Evangelism - Microsoft Corporation http://blogs.technet.com/kevinremde http://twitter.com/kevinremde

    • Marked as answer by Kevin Remde Wednesday, November 21, 2012 12:31 PM
    Wednesday, November 21, 2012 12:31 PM

All replies

  • Hello,

    Can you please provide us some steps of how did you encountered the above issue? It would be great.

    Thursday, May 3, 2012 10:06 AM
  • Make sure port TCP 9389 to access Active Directory Web Services is open from your remote server to your Domain Controller(s). It was my problem this morning...

    Only now when I import-module ACtiveDirectory I get the following Message :

    WARNING : Error initializing default drive : "A local error has occurred".

    and I can't seem to find troubleshooting information anywhere...

    Thursday, May 10, 2012 1:43 PM
  • It doesn't appear that there is an answer forthcoming from this forum.  I hope you were able to resolve this issue by some other means.

    Kevin


    Kevin Remde US DPE - IT Evangelism - Microsoft Corporation http://blogs.technet.com/kevinremde http://twitter.com/kevinremde

    • Marked as answer by Kevin Remde Wednesday, November 21, 2012 12:31 PM
    Wednesday, November 21, 2012 12:31 PM
  • After an hour of research on the exact same issue you are reporting, I found the solution:

    All you have to do (at least what worked for me) is use remote desktop to log into the system and run PowerShell ISE to issue the commands in the RDP session. This error, I suspect based on my experience, is due to account credential delegations on the server. Hope that helps.

    • Proposed as answer by ITGuyOU Tuesday, August 5, 2014 8:44 PM
    Tuesday, August 5, 2014 8:43 PM
  • really?!?!  

    *please* tell me you did *not* receive points for that response!  

    Friday, February 19, 2016 8:06 PM