Posts tagged: saved queries

Find users who have not logged in for a period of time in Active Directory

You can easily see which users have not logged into your Active Directory domain for a period of time by using the Saved Queries functionality built into Active Directory on Windows 2003 server.

Open Active Directory Users and Computers and right click Saved queries shown below and select New -> Query.

lastlogon1

On the New Query screen below. Give your query a name (and also a description if you wish) and click Define Query…

(If you do not want to gather the information from the entire domain, you can click on the “Browse…” button to only select the Organisational Unit you want.)

lastlogon2

Chose an option from the “Days since last logon” drop-down box. This gives you the option of 30, 60, 90, 120 or 180 days which would suit most cases. Then Click OK and then OK again

lastlogon3

Now under our saved queries folder we can see our query which we just created. If you click on it all the matching users will appear on the right hand side of the screen.

lastlogon41

Note: This feature is also available from the Find screen (With the domain selected choose Action -> Find) by selecting “Common Queries” from the Find drop-down menu. But it does not save your query for later use.

Share