ShiftNick

Find User Password Expiry

Mar 25th, 2015
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Replace USERNAME next to the Get-ADUser command to select a valid user
  2.  
  3. Get-AdUser USERNAME -Properties "DisplayName", "msDS-UserPasswordExpiryTimeComputed" |
  4. Select-Object -Property "Displayname",@{Name="ExpiryDate";Expression={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}}
Advertisement
Add Comment
Please, Sign In to add comment