SG Windows IT Pro Group

Where Windows IT Professionals in Singapore meet together...
Welcome to SG Windows IT Pro Group Sign in | Join | Help
in Search
Microsoft's Newsletters: TechNet Flash & Security News Letter
Some other Singapore User Groups: MessagingTalk | SGDotNet

New Members Please Note
To combat bot Signups, we're implementing CAPTCHA. The Join/Sign Up link is not working at the moment. You can request for an account by sending an email to admin@sgwindowsgroup.org. We will create the account for you manually. Thank you for your patience and understanding
Latest post 11-16-2009 5:14 PM by badz. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-16-2009 12:15 PM

    • DTTH
    • Top 50 Contributor
    • Joined on 08-21-2007
    • Posts 20

    Active Directory Computer Names Question

    Hi Guys,

    I came across this question today by one of my colleague "Is there anyways to automate the removal of computer names after dis-joining from domain?"

    It really struck me and pretty hard for me to answer. Typically, i will manual remove the old computer name and then. move to the specified OU.

    Is there really ways to automate this process?

  • 11-16-2009 3:30 PM In reply to

    Re: Active Directory Computer Names Question

    If you dis-joined a computer from domain, you can disable it. THen it will show as disabled computer.

    Else, you can use some scripts and commands to check the computer last login age. If you determine that any computer not logon to domain for more than 30 days as dis-joined computers. Then you can delete any computer with last logon age older than 30 days.

  • 11-16-2009 4:02 PM In reply to

    • DTTH
    • Top 50 Contributor
    • Joined on 08-21-2007
    • Posts 20

    Re: Active Directory Computer Names Question

    orangedeuce:

    If you dis-joined a computer from domain, you can disable it. THen it will show as disabled computer.

    Else, you can use some scripts and commands to check the computer last login age. If you determine that any computer not logon to domain for more than 30 days as dis-joined computers. Then you can delete any computer with last logon age older than 30 days.

    Thanks orangedeuce for the prompt reply.

    However, disabling still required manual work and as for script to determine which computer not logon for more than 30 days after dis-joining from domain and then auto removal from AD is pretty risky too.

    Nonetheless, thanks. Guess i will do it the manual way of disable > delete > move

  • 11-16-2009 4:12 PM In reply to

    Re: Active Directory Computer Names Question

    Hi DTH,

    There is a nice tool that can help you carry out this maintenance tasks: oldcmp.

    Refer to following link for more information:

    http://www.joeware.net/freetools/tools/oldcmp/index.htm

    Filed under: ,
  • 11-16-2009 5:14 PM In reply to

    • badz
    • Top 25 Contributor
    • Joined on 07-08-2005
    • Posts 132

    Re: Active Directory Computer Names Question

    Yep, OldCmp should be able to delete inactive computer objects. Or you can write a VB script or a Powershell script (with the use of the Quest AD cmdlets). Or, you can give the DSQUERY + DSRM tools a try (the usual "use these at your own risk blah blahs" apply). To delete all computer objects which have been inactive for the past 20 weeks:

    dsquery computer -inactive 20 | dsrm

Page 1 of 1 (5 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems