VanillaGranilla

Get AD user password expiration

Sep 14th, 2015
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Get-ADUser -filter {Enabled -eq $True -and PasswordNeverExpires -eq $False} -Properties "DisplayName", "msDS-UserPasswordExpiryTimeComputed" | Select-Object -Property "Displayname",@{Name="ExpiryDate";Expression={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}}
Advertisement
Add Comment
Please, Sign In to add comment