In this article, we will guide you on the process of altering the domain name on Windows Server 2022. A key feature of Windows Server 2022 is its ability to function as a domain controller, providing a centralized platform for accessing services and acting as administrators for domain objects such as users and computers. Through the implementation of policies, roles, and services, we can effectively manage each of these objects. For a more comprehensive understanding of how to change a domain name, we recommend visiting the Woshub website.
Changing the domain name is a task that may not occur frequently, but it can become necessary due to various reasons such as updating the organization’s name, company sale, legal adjustments, and more. However, this process involves several steps. In this article, we will delve into these steps to effectively change the domain name in Windows Server 2022.
Change Domain Name
First, we will need to check the current domain name in the Server Manager.
![server 2025 change1](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-change1.png)
Click on the Tools tab, and then DNS.
![seer 2025 DNS](https://vmorecloud.com/wp-content/uploads/2024/02/seer-2025-DNS.png)
In the DNS manager console, we will right-click on “forward lookup zones” and in the options displayed, we will choose “New zone“
![server 2025 DNS 2](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-2.png)
Welcome to the new zone wizard. Choose next.
![server 2025 DNS 3](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-3.png)
Leave the zone type (primary zone) selected, and then choose next.
![server 2025 DNS 4](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-4.png)
On the Active Directory zone replication scope page, choose the box “To all DNS servers running on domain controllers in this domain: vmorecloud.com and choose next.
![server 2025 DNS 5](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-5.png)
In the zone name window, we enter the name of the new domain and choose next.
![server 2025 DNS 6](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-6.png)
Dynamic update: choose the box Allow only secure domain updates, and click next.
![server 2025 DNS 7](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-7.png)
Verify the new zone wizard summary and click Finish.
![server 2025 DNS 8](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-8.png)
Now you can see “vmorecloud.local” in the DNS manager.
![server 2025 DNS 9](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-9.png)
How to Generate Random List
Search the command prompt and then run an administrator.
![server 2025 DNS 10](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-10.png)
In the console, enter the below command to generate a domain list.
rendom / list
![server 2025 DNS 11](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-11.png)
The above command will create a file with the registered domains. You can see this file on the C: drive.
![server 2025 DNS 12](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-12.png)
We open the file and see the content.
![server 2025 DNS 13](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-13.png)
Now we open the domain list file with Notepad for editing. Click on the Edit menu and choose Replace.
![server 2025 DNS 14](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-14.png)
We need to change the name of the current domain to the new domain. Type the existing domain and the new domain (vmorecloud.local) and click Replace All.
![server 2025 DNS 16](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-16.png)
Finally, replace the current domain name with the new domain in the NetBiosName line. Apply the changes.
![server 2025 DNS 17](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-17.png)
Go back to the command prompt and then type the below command.
random /showforest
This command will show the structure of your new domain that we have registered.
![server 2025 DNS 18 1](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-18-1.png)
Now we run the following command to update this information:.
rendom / upload
![server 2025 DNS 19](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-19.png)
This is the time to prepare the domain name change by entering the following command:
rendom / prepare
![server 2025 DNS 20](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-20.png)
Enter the below command to execute the script.
Random /execute
![server 2025 DNS 21](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-21.png)
Verify the script was executed successfully.
You are about to be signed out, click on Close.” The server will restart.
![server 2025 DNS 22](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-22.png)
On the Windows Server 2022 login screen, we need to select the option “other user.” There, we login with the new domain and user. Now it changed from vmorecloud.com to vmorecloud.local
![server 2025 DNS 23](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-23.png)
How to Fix Domain Name Dependencies in Group Policy Objects
After logging in, access the CMD as an administrator. To fix domain name dependencies in Group Policy Objects, enter the below command.
Gpfixup /olddns:vmorecloud.com /newdns:vmorecloud.local
![server 2025 DNS 24](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-24.png)
We renamed the databases.
![server 2025 DNS 25](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-25.png)
As our root domain remain the same. there is no change.
To clean up loose processes, type the following command:.
![server 2025 DNS 26](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-26.png)
Finally, complete the process with the below command.
![server 2025 DNS 27](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-27.png)
How to Verify New Domain
In the server manager, go to the Tools tab and open “Active Directory Users and Computers“.
![server 2025 DNS 28](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-28.png)
Verify the new domain.
![server 2025 DNS 29](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-29.png)
Also verify active directory domains and trusts.
![server 2025 DNS 30](https://vmorecloud.com/wp-content/uploads/2024/02/server-2025-DNS-30.png)
This has been the method for changing the domain name in Windows Server 2022.