how to clean Active Directory DNS

Posted on 2011-04-21
Last Modified: 2012-05-11
How to clean Stale records/grabage from Active Directory DNS ,
Question by:harispm
    LVL 14

    Expert Comment

    For DNS you can enable scavenging:

    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.

    Author Comment

    I have cleaned DSN entries manually
    LVL 2

    Accepted Solution

    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

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


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Mapping Drives using Group policy preferences Are you still using old scripts to map your network drives if so this article will show you how to get away for old scripts and move toward Group Policy Preference for mapping them. First things f…
    Introduction You may have a need to setup a group of users to allow local administrative access on workstations.  In a domain environment this can easily be achieved with Restricted Groups and Group Policies. This article will demonstrate how to…
    This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
    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…

    737 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

    19 Experts available now in Live!

    Get 1:1 Help Now