Moving users in AD to different OU's and GROUPS

Posted on 2007-10-05
Last Modified: 2008-05-30
I want to move users in my AD into new OU and reasign then to new groups. So for example John Smith will currently be in OU 1 and is a member of GROUP 1 and GROUP 2, I want to move him to OU 2 and reasign him to GROUP 3 while removing him from GROUP 1 and GROUP 2.

I have a lot of users to move and don not want to do this one by one! Is there a way to set this up say using CSVDE or another command?
Question by:Juliafrazer
    LVL 30

    Accepted Solution

    Depending on the specifics of what you're trying to do, you can use dsmove to move users into a new OU, and use dsmod for adding/removing members from a group.

    For example:

    dsmove "cn=jsmith,ou=marketing,dc=company,dc=com" -newparent "ou=training,dc=company,dc=com"

    dsmod "cn=AccountingUsers,ou=marketing,dc=company,dc=com" -addmbr "cn=jsmith,ou=training,dc=company,dc=com"

    Depending on the # of users that you need to move, you can also move multiple users simultaneously using AD Users & Computers - hold down the CTRL key while clicking on the users you want, then right-click and select "Move" to move all of them in a single operation.
    LVL 6

    Expert Comment

    In addition to the above statement you can highlight multiple users, right click and add them to groups as well.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Starting in Windows Server 2008, Microsoft introduced the Group Policy Central Store. This automatically replicating location allows IT administrators to have the latest and greatest Group Policy (GP) configuration settings available. Let’s expl…
    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    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 to another domain controller. Log onto the new domain controller with a user account t…

    754 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

    24 Experts available now in Live!

    Get 1:1 Help Now