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.

Thanks.

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.
LVL 2
maxalarieAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ry_berkCommented:
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

OR
Try this tool:
http://www.dovestones.com/products/True_Last_Logon.asp

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

Try this link:

http://www.pbbergs.com/windows/downloads.htm#AcctAttrib
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
maxalarieAuthor Commented:
@ry_berk

Thanks for the link.  I just need  the tool for computers.. On the webpage you've provided:http://www.dovestones.com/products/True_Last_Logon.asp

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.

thanks.
0
ry_berkCommented:
Try True Last Logon (msi, exe, zip)  

That will show logins
0
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

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

Enjoy and hope it helps you find everything you need
0
maxalarieAuthor Commented:
How do i use this scripot?  I save it as a .bat and execute it?  (sorry Linux guy here)
0
ChiefITCommented:
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:
http://www.petri.co.il/view_additional_user_information_in_aduc.htm
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.