Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save michaelrice136/bb50b1cf37f166d00049 to your computer and use it in GitHub Desktop.
Save michaelrice136/bb50b1cf37f166d00049 to your computer and use it in GitHub Desktop.
Get all AD users that are locked out or have expired passwords
Get-ADUser -Filter * -Properties PasswordExpired, LockedOut | ? { `
($_.PasswordExpired -EQ $True) -OR `
($_.LockedOut -EQ $True) } | Format-Table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment