How to Rename a Domain Controller using netdom

Preparation

  • This guide assumes you are running Windows server 2012 R2, 2016, or 2019
  • You are using a single domain controller
  • You want to rename your DC

Renaming your DC using netdom

Step 1: Open Command Prompt

Open command prompt as a domain administrator by pressing Windows Key

  1. Open the Start Menu
  2. Type CMD
  3. Right-Click on command prompt
  4. select Run as administrator

Step 2: Adding the new name to your DC using netdom

Enter the following command to suit your environment, replacing computer names appropriately. Make sure at each stage in this guide you use the FQDN.

netdom computername CURRENTNAME.DOMAIN.LOCAL /add:NEWNAME.DOMAIN.LOCAL

If the command was successful you should receive the following message: Added (NAME) as an alternate name for the computer. The command completed successfully.

Step 3: Verify the name was added successfully

Ensure the new name was added correctly, enter the following command. Make sure you use the CURRENT name of the computer, NOT the new name you have added.

If this was successful you should see both names appear in the list.

netdom computername CURRENTNAME.DOMAIN.LOCAL /enumerate

Step 4: Changing the primary DC name

Enter the following command to change the additional computer name to primary.

netdom computername CURRENTNAME.DOMAIN.LOCAL /makeprimary:NEWNAME.DOMAIN.LOCAL

You should receive a message stating that the change was successful and that you should now reboot the server.

Step 5: Reboot your server

Reboot your server by either going to the start menu and selecting restart or entering shutdown /r /t into the command prompt window.

Step 6: Verifying the name change

Once your server has been rebooted, open up command prompt and enter the following command using your new computer name, again you should see both of the names in the list.

netdom computername NEWNAME.DOMAIN.LOCAL /enumerate

Step 7: Removing the old hostname

Once you’ve verified that your computer responds to the new hostname, its time to remove the old name.

netdom computername NEWNAME.DOMAIN.LOCAL /remove:OLDNAME.DOMAIN.LOCAL

Step 8: Checking for issues

Run the following command to check to make sure everything on your DC is functioning correctly.

dcdiag

If you require assistance or clarification regarding anything mentioned in the above article, reach out and receive expert support from the highly skilled technical team here at AOIT. We are dedicated to providing exceptional customer service and will be more than happy to assist you.

To initiate a support request, kindly click the “Request Assistance” button and a member of our team will respond to you within 24 hours.

Thank you for choosing AOIT for your technical support needs.

Similar articles you may find interesting...

Enforced 2FA
Information

Enforced Two-Factor Authentication (2FA)

Starting Monday, November 18th 2024, 2FA will be mandatory for accessing your account. This is necessary because our dashboard allows Single Sign-On (SSO) to server and hosting control panels, it also contains personal details and billing information. Ensuring the security of your data is our top priority.

Read More »
What is DNS
Domains and DNS

What is a DNS and How Does it Work?

What is a DNS? A domain name system (DNS) is a naming database. In this database, internet domain names are identified and translated into Internet Protocol (IP) addresses. The DNS maps the name people use to locate a website to the IP address that a computer uses to locate that website, creating a connection between

Read More »
SSH Keys RSA vs ED25519
Information

SSH Keys Choosing RSA or Ed25519

SSH, or Secure Shell keys have a critical role in modern authentication and encryption when establishing secure connections. By utilising advanced mathematical functions SSH keys ensure that only permitted and trusted users can access remote resources. Within the world of SSH keys there are two main choices for encryption algorithm: RSA and Ed25519. In this

Read More »