Get AD Users Password expiration date

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche
Get-ADUser -filter {Enabled -eq $True -and PasswordNeverExpires -eq $False} –Properties "DisplayName", "msDS-UserPasswordExpiryTimeComputed", "PasswordLastSet" `
| Select-Object -Property "Displayname",@{Name="ExpiryDate";Expression={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}}, "PasswordLastSet"