How to find old computers in active Directory

How can i find old computers in AD on SBS 2003?  I  know i have old computers in there, but not sure when they logged for the last time.. I'd like to know which one I can erase from my domain.


Edit: I already tried dsquery computers -inactive 52  but got this error message:
 C:\Documents and Settings\Administrator> dsquery computer -inactive 10
dsquery failed:The parameter is incorrect.:Windows could not run this query beca
use you are connected to a domain that does not support this query.
type dsquery /? for help.
Who is Participating?
Are you looking to run a script to do this or do you want a tool to do it for you?

You can check out AD Manager from ManageEngine for a really cool AD Tool with Web GUI

Try this tool:

For scripts there are many available, but you'll need to amend it to find computers as opposed to users:

Try this link:
maxalarieAuthor Commented:

Thanks for the link.  I just need  the tool for computers.. On the webpage you've provided:

Which tool can help me find  old computers?
I see
AD Bulk Users (msi, exe, zip)             
AD Bulk Contacts (msi, exe, zip)             
AD Bulk Export (msi, exe, zip)             
AD Find and Replace (msi, exe, zip)             
True Last Logon (msi, exe, zip)             
Home Folder Creator                   
AD Photos

But im not sure which one to pick in order to find old computers.

Try True Last Logon (msi, exe, zip)  

That will show logins
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

maxalarieAuthor Commented:
I have foudn it.  Last Logon 2.9 (there is an option in the screenshot for either users or computers)

Enjoy and hope it helps you find everything you need
maxalarieAuthor Commented:
How do i use this scripot?  I save it as a .bat and execute it?  (sorry Linux guy here)
There is a hidden application that will add extra data to your Active directory profiles. This includes last login data. All you have to do is register a DLL.

regsvr32 %systemroot%\system32\acctinfo.dll

regsvr32 /u %systemroot%\system32\acctinfo.dll

You can see the enhancements to AD by reviewing this page:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.