How to move a user account in Active Directory using PowerShell scripts?

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

Move a User Account in Active Directory using ADManager Plus

» 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.
  • Embark on your script-free AD management, reporting, and automation journey with ADManager Plus.
  •  
     
  • By clicking 'Start your free trial now', you agree to processing of personal data according to the Privacy Policy.
  • Thanks
  • Your download should begin automatically in 15 seconds. If not, click here to download manually.

Related Powershell How-to Guides:

The one-stop solution toActive Directory Management and Reporting

Email Download Link