Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Removing old AD computers

Posted on 2011-03-08
3
Medium Priority
?
284 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 36

Accepted Solution

by:
Seth Simmons earned 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Here's a look at newsworthy articles and community happenings during the last month.
How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
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 …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

916 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