Below is the command am using in AD power shell to pull information on list of users, username, last logon date, account status, password last set, password expiration date, last modification date user ID, password never expires.
Get-ADUser –Filter* -Properties DisplayName, PasswordLastSet, LastLogon, WhenChanged| Select DisplayName, PasswordLastSet, LastLogon, WhenChanged |Export-CSV C:\new.csv
Whenever this is executed it only gives me error. Can someone help me with the right command or what could have been my issue?