Solved

Removing old AD computers

Posted on 2011-03-08
3
245 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

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you have users whose passwords are expiring and they are constantly calling you?  Well I sure did and needed a way to put an end to this.  We have a lot of remote users which would not be notified that their passwords were expiring since they wer…
Synchronize a new Active Directory domain with an existing Office 365 tenant
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 transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

919 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

14 Experts available now in Live!

Get 1:1 Help Now