How to delete old PC accounts from active directory?

Posted on 2011-04-18
Last Modified: 2012-08-13
Is there a free tool, or batch file I can use to delete all computer accounts that have not been seen by the domain controller, in lets say 60 days (or 90, or 120)? There are a bunch of PCs I have scrapped whose corresponding accounts I neglected to delete.
This is a Windows 2003 Domain with a total of 60 onsite PC's.
Question by:HardwareDude
    LVL 10

    Expert Comment

    LVL 10

    Expert Comment

    More specifically to that discussion:


    LVL 57

    Accepted Solution

    I was part of that previous discussion and still recommend oldcmp :)

    One nice thing about oldcmp is that Joe has put a lot of safety features in.   Typical use is to dislable after a certain amount of days then delete.

    For example disable after 90 and delete after 180.

    If you have clusters be careful of that computer account.

    Another tool I'm going to soon review for my blog is AD Tidy

    haven't fully tested so can't 100% recommend but if you prefer a GUI that could be a nice tool.



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Ever wondered why Windows 8 and 10 don't seem to accept your GPO-based software deployment while Windows 7 does? Read on.
    Learn about cloud computing and its benefits for small business owners.
    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…

    759 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

    9 Experts available now in Live!

    Get 1:1 Help Now