2014-12-04
There are a number of cmdlets for working with active directory in powershell which can be super helpful - especially when an organization uses cryptic windows IDs.
Get a windows user name for an id:
get-aduser MyCrypticId
Check if an account never expires:
Search-ADAccount -PasswordNeverExpires |
? name -eq "MyCrypticId"
See if an account is locked:
Search-ADAccount -LockedOut | ? name -eq "MyCrypticId"
I can never seem to remember how this module gets installed. Quite simply go to:
Programs and Features > Turn Window Features on or off
> Remote Server Administration Tools
> Role Administration Tools
> AD DS and AD LDS Tools
> Active Directory module for Windows Powershell
mLabels: Active Directory, POSH