Created
November 15, 2014 20:43
-
-
Save MyITGuy/43fbce0bb11073dc0643 to your computer and use it in GitHub Desktop.
PowerShell: Locked Out Accounts with Lockout Time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Search-ADAccount -LockedOut | Get-ADUser -Properties lockoutTime | Select @{Name="sAMAccountName";Expression={$_.sAMAccountName.ToUpper()}},@{Name="LockoutTime";Expression={([datetime]::FromFileTime($_.lockoutTime).ToLocalTime())}} | Sort LockoutTime -Descending |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment