Disable accounts if they are in a specific OU

Posted on 2007-10-05
Last Modified: 2008-05-30
Can you set a policy or property to an organizational unit within AD Users and Computers to disable an account if they are a member of that OU?

We automate account generation using MIIS. When an account is inactive for x days (based on information in MIIS), we have MIIS move that account from its existing OU to an OU entitled Disabled Users. We want accounts in the Disabled Users OU to actually be disabled as well.
Question by:Hatmonster
    1 Comment
    LVL 19

    Accepted Solution

    Personally, I don't know of any way to accomplish what you're specifically looking for. You could easily run a script every so often that disables all the accounts based on OU:

    Or use a program like to make bulk changes to all the accounts in that OU at one time:

    I know, not as automated as you'd like....I'll be curious if someone else has a slick solution.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Companies that have implemented Microsoft’s Active Directory need to ensure that the Active Directory is configured and operating properly. If there are issues found and not resolved, it eventually leads the components to fail or stop working and fi…
    Installing a printer using group policy preferences is not that hard let’s take a look at it. First lets open up your group policy console and edit the policy you want to add it to. I recommend creating a new policy for each printer makes it a l…
    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

    11 Experts available now in Live!

    Get 1:1 Help Now