I’m trying to export inactive users and computers from active directory, and have it filterd to only show objects that were created longer than 6 months ago.
I’m trying to set this up as a scheduled task so I’m hoping to have the date as a variable.
I know it is possible to use:
dsquery user -inactive 24 to show the users which have been inactive and the same for computers. But I dont know the switch to filter this to show accounts that were created more than 6 months ago
csvde exports all of AD and I can see the whenCreated field but I dont know how to filter this down to just inactive users or user accounts which have been created more the 6 months.
Is it possible to pipe these two or is there another tool?