PowerShell: Get-ADUser to retrieve password last set and expiry information

Get-ADUser -identity username -properties *
 get-aduser -filter * -properties passwordlastset, passwordneverexpires |ft Name, passwordlastset, Passwordneverexpires
get-aduser -filter * -properties passwordlastset, passwordneverexpires | sort name | ft Name, passwordlastset, Passwordneverexpires

Export the list to CSV so we can work on it in Excel. In this example we substitute, format table (ft) for select-object.


Get-ADUser -filter * -properties passwordlastset, passwordneverexpires | sort-object name | select-object Name, passwordlastset, passwordneverexpires | Export-csv -path c:\temp\user-password-info-20131119.csv


Deixe uma resposta

O seu endereço de email não será publicado. Campos obrigatórios marcados com *