Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Get-MsolUser -userprincipalname user@domain.org | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={(Get-Date)-$_.LastPasswordChangeTimeStamp}}
- DisplayName LastPasswordChangeTimestamp PasswordAge
- ----------- --------------------------- -----------
- User, Name 09-Mar-16 5:48p 42.22:34:10.6964630
- Get-MsolUser -All | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={(Get-Date)-$_.LastPasswordChangeTimeStamp}} | where {$_.PasswordAge -gt “30”} | sort-object PasswordAge -descending
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement