My organization is trying to streamline our Active Directory cleanup. Our policy is to leave the accounts of terminated employees in the Disabled Users OU for 30 days. After 30 days, the account is deleted, pending approval of HR.
What I am looking for is a query that I can import into AD Users and computers that will do the following:
Search just the Disabled Users OU
List any accounts that has a Modified Date of greater that X days from the current date.
I am not looking for third party tools, as once this process is up and running, it will be delegated to our Help Desk.
I also realize that you can sort the Disabled Users List by Modified date and select the accounts to delete manually, but management wants the process to be as automated as possible.
Any assistance would be greatly appreciated.