[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

how to clean Active Directory DNS

Posted on 2011-04-21
3
Medium Priority
?
644 Views
Last Modified: 2012-05-11
How to clean Stale records/grabage from Active Directory DNS ,
0
Comment
Question by:harispm
3 Comments
 
LVL 14

Expert Comment

by:Vinchenzo-the-Second
ID: 35439500
For DNS you can enable scavenging:
http://technet.microsoft.com/en-us/library/cc755716(WS.10).aspx

For AD it's a manual process i'm affraid.  You can create scripts to let you know what objects are stale, or you can use 3rd party tools.  Quest Reporter is a good tool so is AD Manager Plus.
0
 

Author Comment

by:harispm
ID: 35770988
I have cleaned DSN entries manually
0
 
LVL 2

Accepted Solution

by:
barrymercer earned 2000 total points
ID: 35948123
for cleaning up AD you can do a
dsquery user -inactive xx

Open in new window

or a
dsquery computer -inactive xx

Open in new window

xx is the number of weeks since lastlogon. nb, this takes two weeks to replicate, so for safety, add two weeks on to the value you want.

cat them to a text file to check them, then if you want to, pipe the output into dsmod to disable them

so
dsquery user -inactive x > c:\inactiveusers.txt
notepad c:\inactiveusers.txt
dsquery user -inactive x | dsmod user disabled=yes

0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Let's recap what we learned from yesterday's Skyport Systems webinar.
Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure 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 …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

830 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