Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
Removing old computers on a domain

We've got a Windows Server 2008 instance (R1) and have several computers that are no longer present. Still, they show up in the AD.

Is there a way to purge old computers that have not been online for X months from the AD?

share|improve this question

marked as duplicate by jscott, Evan Anderson, Massimo, Holocryptic, Shane Madden May 13 '11 at 14:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

Check out PowerGUI from Quest, you can use it to run a search for workstation objects that have not been active in X number of days, and then delete them. Do be careful with the tool, it's very powerful.

share|improve this answer

JoeWare has a script that will query for old computers. This works for 2000/2003, I'm not sure how nicely it will work on a 2008 Native domain, though.


There's also an article on the MS Scripting center about how to do it:


Edit: JScott's answer from a previous thread seems to be the best answer:

dsquery computer -inactive 10 -limit 0

Where 10 is the number of weeks of inactivity

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.