Using Net User command to Display User Expiration Date

[ps]Net user USERNAME /domain[/ps]

Using Powershell

[ps]get-aduser -filter * -properties passwordlastset, passwordneverexpires |ft Name, passwordlastset, Passwordneverexpires[/ps]

To display the expiration date rather than the password last set date, use this command.

[ps

[ps]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”)}}[/ps]


Comments are closed.