I am trying to set a query in the Active Directory Saved Queries, to display the Expired Users accounts.
So far the custom query I found was
But it provides all accounts with an expiration date set.
With a different sintax I have tried also the following:
(&(objectCategory=person)(objectClass=user)" _ & "(!accountExpires=9223372036854775807)(!accountExpires=0))
and it gives no result, even knowing that there are expired accounts.
Any better query?
I am not looking for Shell scripts.