Solved

Removing old AD computers

Posted on 2011-03-08
3
236 Views
Last Modified: 2012-05-11
I have a lot of old machines on our AD that I need to clean it up. How to I do so .
 
0
Comment
Question by:koscisze
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
Seth Simmons earned 500 total points
ID: 35072345
From a domain controller...

dsquery computer -inactive x

replace x with number of weeks since being inactive

dsquery computer -inactive 52

displays computer accounts inactive more than 1 year

if you want to automatically remove those accounts...

dsquery computer -inactive 52 | dsrm
0
 
LVL 27

Expert Comment

by:KenMcF
ID: 35072408
I like using oldcmd from joeware.net it can also give you a nice report before you want to delete any computers.

http://www.joeware.net/freetools/tools/oldcmp/usage.htm
0
 
LVL 27

Expert Comment

by:KenMcF
ID: 35072413
"oldcmd" should be oldcmp
0

Join & Write a Comment

Resolve DNS query failed errors for Exchange
Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now