How to NetDom: Rename a Computer Remotely in Active Directory

Author: Peter Barnett           Date: Dec 06, 2019

To rename a computer or a member server in a domain network, you must use the netdom system utility, which comes in the Windows Server editions. This utility comes with Active Directory Domain Services Tools, which is installed on simple PCs for remote administration of servers running Windows Server.

What Is Netdom Utility

NETDOM is a utility for renaming computers in a domain. The utility is a graphical interface of the built-in NETDOM command utility, which is part of the Windows Server 2003-2008 utilities. The application allows you to get a list of computers on the network and automatically rename it to the specified name.

Despite its simple interface, this program is a powerful administration tool, especially when the use of new graphical administrative utilities has not yet become automatic. Most important are the ability to view role carriers, transfer workstations and servers between domains, and manage trust relationships between domains. This program is worth using.

Rename a Computer in a Domain Remotely Using Netdom Command

To rename computers in a domain remotely, you need:

  • Renamed computer must be turned on.
  • On the local computer (if you will rename computers from your workstation, and not from the server) the netdom.exe program must be installed.
  • If you are going to rename computers from the CSV file then you need PowerShell.

Now you can proceed to rename the computer:

  • Go to the folder with the utility netdom.exe

    Step to Remote Rename a Computer is to go to folder with netdom

  • Execute the Netdom command:

    netdom renamecomputer old_computer_name / newname: new_computer_name / userd: domain_name \ admin_name / passwordd: domain_admin_user_password / usero: local_administrator / passwordo: local_local_administer_password / reboot: time_in_seconds_to_automatic_reloading

    Step to Remote Rename a Computer is to run netdom command

If you need to rename computers according to the list from the CSV file, then:

  • Create the rename.csv file in the c: \ temp folder

    Create file rename csv

  • Write to this file a list of computers in a text editor without spaces between commas, in the format:

    Old_computer_name, new_computer_name

  • Create the file rename.ps1 with the following contents:

    $csvfile = "C:\temp\rename.csv"
    Import-Csv $csvfile | foreach {
    $oldName = $_.OldName;
    $newName = $_.NewName;
    Write-Host "Renaming computer from: $oldName to: $newName"
    netdom renamecomputer $ oldName / newName: $ newName / userd: domain_name \ administrator_name / passwordd: domain_administrator_password / usero: local_administrator / passwordo: local_administrator_password_old_computer / reboot: time_in_seconds_to_auto_reboot

    Then run this script.

Detailed Syntax of Command netdom

Renaming is done under a domain account.

Command syntax:

netdom renamecomputer computer /newname: new_computer_name /userd:[ domain_name \] administrator_name [/passwordd:[ password | *]] /usero:[ domain \] local_administrator> [/passwordo:[ password | *]] [/reboot[: time ]] [{/help | /?}]

Sometimes it is enough to enter:

netdom renamecomputer computer / newname: new_ computer_name / userd: [ domain_name \] administrator_name / passwordd: [ password ]

More details:

  • renamecomputer - key for renaming;
  • computer - computer before renaming;
  • / newname: new_computer_name - desired computer name after renaming (no quotes are needed!);
  • / userd: domain_name \ administrator_name - here you must put the name of the domain administrator;
  • / passwordd: * - leave exactly as written, in fact, this key determines the wildcard character when entering the password;
  • / usero: local_administrator - here you must enter the username of the local administrator (or repeat the domain entry, if he has administrator rights on the local machine);
  • / passwordo: * - local administrator password.

Consider using Action1 to rename a computer in a domain network if:

  • - You need to perform this action on multiple (hundreds or even thousands) computers simultaneously.
  • - You have remote employees with computers not connected to your corporate network at all times.

Action1 is a cloud-based platform for patch management, software deployment, software/hardware inventory, endpoint management and endpoint configuration reporting. It is free with basic functionality.


Fully functional free edition for up to 10 endpoints with no expiration date. More details >

Relevant How To Articles and Action1 Features:

By continuing to use our website, you agree with our use of cookies in accordance with our Privacy Policy. You can reject cookies by changing your browser settings.     
Ok, got it