I have this code that works.
get-aduser -ldapfilter "(&(&(objectCategory=user)(userAccountControl=512)))" | Select sAMAccountName, Enabled, givenname | out-file c:\temp\\users1.csv
The problem is it gets ALL active user accounts and due to bad AD management over the past 10 years we have 3,800 active user accounts but only 1,300 people working at our company
How would I tweak my code to show all active users who have actually logged into AD in the past 100 days? Note: I can't look for users who have changed their password since we have no password policy in place.