Today I had the need to find a list of users with an expiration date in my A.D. environment.
An additional information I was interested in was not only to know if the user had an expiration but also the date in wich the user actually expires.
I know there are a lot of ways to have the informations above but the GenericADO script of Richard Mueller really made my day.
The original code and explanation is here Generic ADO Searches
The script is really powerfull, but in my situation it was enough to follow waht Richard says here LDAP Account Expiration Query
If you want to put all in a csv file, the command line would be something like
cscript GenericADO.vbs /csv > c:\export.csv
That’s all, and thank you again to Richard :-)