Skip to content

Instantly share code, notes, and snippets.

@nopslider
Created December 10, 2014 15:10
Show Gist options
  • Save nopslider/45575d43fdf96119ee7f to your computer and use it in GitHub Desktop.
Save nopslider/45575d43fdf96119ee7f to your computer and use it in GitHub Desktop.
Find active user accounts with passwords that never expire
Get-ADUser -Filter * -Properties * `
| where {($_.enabled -eq $true) -and ($_.lockedout -eq $false)} `
| where {$_.passwordneverexpires -eq $true} `
| select SamAccountName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment