Active Directory Domain Services Windows 2008 R2 cmdlets – Search-ADAccount

  You have to run Search-ADAccount in the  Active Directory Modile for Windows Powershell! Here is an example for finding disabled accounts : Search-ADAccount -AccountDisabled -UsersOnly | Format-Table name, sid -AutoSize   PS S:\> Search-ADAccount -? NAME Search-ADAccount SYNOPSIS Gets Active Directory user, computer, or service accounts. SYNTAX Search-ADAccount -AccountDisabled <switch> [-AuthType {Negotiate | Basic}] [-ComputersOnly <switch>] [-Credential <PSCredential>] [-ResultPageSize <in t>] … Read moreActive Directory Domain Services Windows 2008 R2 cmdlets – Search-ADAccount

Finding disabled user accounts in Active Directory Domain Services

http://technet.microsoft.com/en-us/library/ee176949.aspx#EEAA I f  Get-ExecutionPolicy returns restricted you are3 not able to run powershell scripts : PS C:\> c:\locatedisabledusers.ps1 File C:\locatedisabledusers.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please se e “get-help about_signing” for more details. At line:1 char:27 + c:\locatedisabledusers.ps1 <<<< + CategoryInfo : NotSpecified: (:) [], PSSecurityException + … Read moreFinding disabled user accounts in Active Directory Domain Services

Please turn AdBlock off