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 more