-2

I have looked all over but can't seem to find a specific way of exporting a list of users (by the OU they are in) that contains. their account status, last login date and password change date.

I have an old dsquery command but that does not give me enough detail:

dsquery group -samid “Users” |dsget group -members -expand | dsget user -samid > userlistforauditors.txt

I also looked at the ADSI Edit tool but that does not provide an "export" of the info. Can someone help?

thanks Kay

1 Answer 1

2

You can start here. The script that you download might need minor tweaks. https://gallery.technet.microsoft.com/scriptcenter/Get-All-AD-Users-Logon-9e721a89

Password expiry.

Get-ADUser -Filter {Name -eq "<namehere>"} -SearchBase "DC=nzadmin,DC=local" -Properties "DisplayName", "msDS-UserPasswordExpiryTimeComputed" |Select-Object -Property "Displayname", @{Name="ExpiryDate";Expression={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}}
1
  • Thank you for this. I will go through and tweak as needed. As you might suspect this is information for the SOC auditors. They don't just want an "export list" from the AD Users & Computers containers. Thanks again.
    – Girlgeek
    Dec 20, 2018 at 14:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .