How to move a user account in Active Directory using PowerShell scripts (2024)

Read on to know how to move a user in Active Directory (AD) using PowerShell and how you can get it done easier with ADManager Plus.

Windows PowerShell

Steps to move a user account in AD using powershell :

  • Identify the domain in which the user to be moved is located.
  • Create and compile the script for moving an AD user from one OU to another. Execute the script in PowerShell.
  • Sample script for moving user account in AD
  • Copied

    C:\PS>Move-ADObject "8d0bbb44-d826-4ed8-3d5c-2c634560pkt32" -TargetPath "OU=Managed,DC=Example,DC=Com"

    Click to copy entire script
  • To move AD users in bulk, you will have to write another script.

ADManager Plus

How to move a user account in Active Directory :

  • Navigate to Management > User Management > Move Users..
  • Select the Users and the OU to which you want the computers to be moved to. You can even import this list from a CSV file. Then click Apply.

Screenshot

How to move a user account in Active Directory using PowerShell scripts (1)

» Start 30-day Free Trial

Although moving AD users from one OU to another with native tools like PowerShell looks simple, it comes with a few limitations :

  • PowerShell script can be run only from the computers which have the Active Directory Domain Services role installed in them.
  • Need for a new script, in case multiple AD users need to be moved.
  • The syntax, parameters and iterations need to be correct. A typo or incorrect syntax might be difficult to spot and rectify especially when the script is a long one.
  • You can move the AD user only if you know the Distinguished name or the GUID of the AD account.
  • Cannot delegate the modification of AD accounts or other AD management tasks to help desk technicians.

ADManager Plus lets you perform the same with a few clicks from its web based GUI console. It also has options for moving multiple users simultaneously with templates or by importing a CSV file.

Move users to different OUs in bulk using a CSV file.

Get 30-day free trial.

How to move a user account in Active Directory using PowerShell scripts (2024)
Top Articles
Latest Posts
Article information

Author: Greg O'Connell

Last Updated:

Views: 5651

Rating: 4.1 / 5 (62 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Greg O'Connell

Birthday: 1992-01-10

Address: Suite 517 2436 Jefferey Pass, Shanitaside, UT 27519

Phone: +2614651609714

Job: Education Developer

Hobby: Cooking, Gambling, Pottery, Shooting, Baseball, Singing, Snowboarding

Introduction: My name is Greg O'Connell, I am a delightful, colorful, talented, kind, lively, modern, tender person who loves writing and wants to share my knowledge and understanding with you.