I was given the task to get AD user account information for the following: User must change password at next logon, for Enabled only accounts, and the modified dates of those accounts for the last 90 days. I have used this script
Keep in mind that -Properties * returns ALL properties which is a much bigger query than just getting the properties you need. Above is not tested, but should be something like that.
Back in March I couldn’t get the suggestion you gave me to work and, obviously, I did not write it correctly. My PS script has to meet the following criteria:
Enabled accounts
“User must change password at next logon” setting still enabled
I also tried this with the PasswordLastSet -gt 0. This change actually gave me values verses -lt 190 that did not. However, spot checking the export revealed that these accounts did not have the User must change password at next logon set. What am I botching up?