Unlocking AD account - not working from command line

Welcome Forums General PowerShell Q&A Unlocking AD account - not working from command line

This topic contains 4 replies, has 2 voices, and was last updated by

 
Participant
8 months, 4 weeks ago.

  • Author
    Posts
  • #94507

    Participant
    Points: 1
    Rank: Member

    Hi There,

    I have access to unlock AD accounts via the "Active Directory Users and Computers" console, however, if I try the same thing from the command line (Unlock-ADAccount) the system shows a "insufficient access rights" error even though I open the PS console with the account having rights to do that AND even enter the same account using the -Credentials parameter.

    What's going on?

  • #94512
    Jon

    Participant
    Points: 26
    Rank: Member

    Are you running powershell as admin?

    • #94515

      Participant
      Points: 1
      Rank: Member

      Yes, that account has domain admin rights.

      To perhaps clarify this, I open the AD console using my domain admin account (Run As) and I can unlock accounts, I open the PS console using the same account, no dice.

    • #94516
      Jon

      Participant
      Points: 26
      Rank: Member

      Check out this

      Also running it with an account that has Domain Admin rights, is not the same thing as running powershell as administrator. Does the powershell bar says "Windows Powershell" or does it say "administrator: Windows powershell" ?

    • #94521

      Participant
      Points: 1
      Rank: Member

      Well my friend, I have to thank you for that link, applying the Hotfix mentioned solved the problem.

The topic ‘Unlocking AD account - not working from command line’ is closed to new replies.