Get AD Users Password expiration date
Aus Wiki-WebPerfect
Version vom 5. November 2021, 14:02 Uhr von Admin (Diskussion | Beiträge)
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"