news
Serverspace has added a new Rocky Linux OS
OL
July 1, 2021
Updated May 25, 2023

How to Manage User Accounts in Active Directory. Part 2: Moving and Renaming User Accounts

AD Windows

Users are one of the most popular objects in AD. They are used for authentication and authorization on workstations. Also, in many services which are integrated with AD. User management is the main routine for sysadmins and helpdesk specialists. This guide helps to manage such objects in multiple ways. For managing users there is a need to install RSAT tools or manage them from your DC. You have to be signed under domain admin or an Account Operators user or with delegation rights to create objects in the current OU.

Moving a User Account via Active Directory Users and Computers(ADUC)

In ADUC (dsa.msc) go to the OU or container with needed user account. Rightclick it and select Find.... In the Name field, type the name of the user account and then click Find Now... From the list of Search results, select the needed user object.

Right-click on the user account. Select Move... from the menu.

The Move window appears:

Moving a User Account via Active Directory Users and Computers(ADUC)

In the Move window, navigate to the OU or container where you want to move the user object to, select it and click OK.

Moving a User Account via Command Prompt

In order to move user object(GSoul in our case) to “Employees” OU run dsmove.exe in cmd with the following parameters:

dsmove.exe "CN=GSoul,CN=Users,DC=office,DC=local" -newparent "OU=Employees,DC=office,DC=local"

Moving a User Account via Windows PowerShell

Use the following Powershell code to move a user account (GSoul in our example) to “Employees” OU.

Import-Module ActiveDirectory
Move-ADObject -Identity:"CN=GSoul,CN=Users,DC=office,DC=local" -TargetPath:"OU=Employees,DC=office,DC=local"

How to Rename a User Account in Active Directory

In order to rename a user account, follow these several instructions.

Renaming a User Account via Active Directory Users and Computers

In Active Directory Users and Computers (dsa.msc) in the View menu, enable Advanced Features.

Navigate to OU or container where needed user object resides. Right-click it and select Find.... In the Name field, type the name of the user and press “Find Now”. From the search results right-click the needed user account and select Rename. Type the new name and press Enter.

Renaming a User Account via Active Directory Users and Computers

In the Rename User window, enter new data for other attributes and click OK.

Renaming a User Account via Command Prompt

Use dsmove.exe with the following parameters in order to rename a user:

dsmove.exe "CN=GSoul,CN=Users,DC=office,DC=local" -NewName "Gordon Gates"

Renaming a User Account via PowerShell

In order to rename a user in AD enter this code into Windows PowerShell:

Import-Module ActiveDirectory
Rename-ADObject -Identity "CN=GSoul,CN=Users,DC=office,DC=local" -NewName "Gordon Gates"

Vote:
5 out of 5
Аverage rating : 5
Rated by: 1
1101 CT Amsterdam The Netherlands, Herikerbergweg 292
+31 20 262-58-98
700 300
ITGLOBAL.COM NL
700 300
We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.