There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
audio avg avg 8 backup bios boot browser bsod computer cpu crash css desktop driver drivers dvd email error excel explorer firefox firefox 3 freeze game graphics hard drive hardware help please hijackthis hjt install internet internet explorer itunes javascript keyboard lan laptop malware missing monitor msn network networking openoffice outlook outlook 2003 outlook express php popups problem router screen seo slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp wireless word
Networking
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Networking >
Cleaning Active Directory Computers


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
lwears's Avatar
Computer Specs
Member with 32 posts.
 
Join Date: Sep 2007
Location: Birmingham
Experience: Intermediate
14-May-2008, 05:32 AM #1
Cleaning Active Directory Computers
Hey Guys,

Just been assigned a job to do with Active Directory, I have got to clear out any out-of-date computer names that have been idle for over a month. Is there a tool integrated into AD to do this? If not how can I get this done, are there any other tools? We have got a working install of system centre if that helps.

Thanks
Liam
jmwills's Avatar
Computer Specs
Distinguished Member with 3,040 posts.
 
Join Date: Sep 2005
Experience: Learning More Everyday!!
14-May-2008, 07:45 AM #2
If you go into the standard querys for AD, you will see one that does what you want for 45 day inactive users. Export the query and change the parameters so that computers are defined.

Send me a private message and we can work offline on this if you want to, since this could contain sensitive data.
__________________
MCSE 2003/Network+/Security+
Microsoft MVP User - Desktop Experience

Currently Deployed in Support of OIF

Last edited by jmwills : 14-May-2008 07:51 AM.
lwears's Avatar
Computer Specs
Member with 32 posts.
 
Join Date: Sep 2007
Location: Birmingham
Experience: Intermediate
14-May-2008, 09:42 AM #3
Hello JMWILLS

Can You explain this in a bit more detail? I know where the queries are, but how do i copy the parameters across? I can only find the saved queries aswell, this only gives me the option to create new queries. BTW we are using 2003

Thanks Liam
jmwills's Avatar
Computer Specs
Distinguished Member with 3,040 posts.
 
Join Date: Sep 2005
Experience: Learning More Everyday!!
14-May-2008, 09:57 AM #4
You need to export the existing query for 45 days user to a file somewhere on a local machine. Right click the XML file and edit. That will open the file in notepad.
There will be three parameters you need to change:

Name
Description
OU Name

Save the file and import it into your Saved AD queries.

The query actually looks at last logon but since you only have one DC this will suffice your needs.
__________________
MCSE 2003/Network+/Security+
Microsoft MVP User - Desktop Experience

Currently Deployed in Support of OIF
lwears's Avatar
Computer Specs
Member with 32 posts.
 
Join Date: Sep 2007
Location: Birmingham
Experience: Intermediate
14-May-2008, 10:26 AM #5
Where is the existing query to open? I have found Hyena this looks interesting, have you used this?
StumpedTechy's Avatar
Distinguished Member with 6,142 posts.
 
Join Date: Jul 2004
Location: Central Florida
Experience: Advanced
14-May-2008, 10:09 PM #6
I have to wonder why your wasting time using a bunch of other tools? Look here -

http://www.windowsnetworking.com/kba...ountsinAD.html

dsquery computer -inactive 4 -limit 0
will give you anything more than 4 weeks inactive

dsquery computer -inactive 4 -limit 0 | dsrm
will delete them

You have to ensure the workstation your using has the Server 2003 support pack on it.

BTW with a little VBS you can DSquery to get the information and then pump the information to ADSI to do something else, What I did was set a query for 6 weeks and then set it so the VBS notes the machines as being disabled on the date I ran the script in the comments and then disables the computer accounts. This way I can renable the account if its a traveling user or something.
__________________
What? This doohicky goes in that thingymabob?
jmwills's Avatar
Computer Specs
Distinguished Member with 3,040 posts.
 
Join Date: Sep 2005
Experience: Learning More Everyday!!
15-May-2008, 01:48 AM #7
Nice tool and it works great. The saved query is there without having to do anything else. However, as with Windows, there are several way to do the same thing.

The saved queires are teh the top fo the list for all AD Objects. this also depends on the schema of your AD.
__________________
MCSE 2003/Network+/Security+
Microsoft MVP User - Desktop Experience

Currently Deployed in Support of OIF
lwears's Avatar
Computer Specs
Member with 32 posts.
 
Join Date: Sep 2007
Location: Birmingham
Experience: Intermediate
02-Jun-2008, 06:26 AM #8
Thanks StumpedTechy found your post really useful, and it this very moment I am testing dsquery.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 06:41 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.