AD cleanup using Command Prompt RRS feed

  • Question

  • Hello,

    I have a few housekeeping tasks I need to undertake, one of which is cleaning up AD.

    I would like to do this using Command Prompt.

    I have been using the following command to locate inactive computer accounts:

    Dsquery computer –inactive (# of weeks) –limit 0


    I would like to:

    ·         Receive a count of the number of accounts located

    ·         Disable all the accounts I locate

    ·         Move them to another OU


    Any help creating the command string would be greatly appreciated.



    Thanks in advance


    Tuesday, March 1, 2011 11:49 PM


All replies