We help IT Professionals succeed at work.

Windows Server Saved Queries--Expired accounts Using CSV

I would like to find expired accounts using Saved Queries, but I would like to run against a csv file containing the users in question.

Can someone assist?

Watch Question

Your best option for doing what you describe is to use a PowerShell script that looks for a particular date in the accountExpires attribute with the other attributes you want, and then pipe that to Export-CSV -path "filepathgoeshere".

You'll probably need to find a calculator to determine the number of seconds after 1/1/1600, which is the value I'm guessing the accountExpires attribute uses.