In today’s blog, I will explain how to change server name 2022 Windows Server using the server settings menu, Server Manager, Control Panel, PowerShell, and Command Prompt. You can get your computer name back to default by noting it down and following the below steps again. Let’s get started.
Table of Contents
Prerequisites
Dedicated server, Virtual Machine, or Hyper-V with Windows Server 2022 installed
I logged in to the server with an administrator account.
Change Server name via Server Manager
In the Server Manager, from the left side, select the local server and then click on the computer name.
For system properties, select the change button.
Now enter the server’s name you wish to change it to, and then select OK.
You need to restart your server to apply the changes. Select OK to restart your computer.
Click ok
Click on Restart Now.
Change Hostname Name Server 2022
Right-click on this PC’s name and then select Properties.
Under About, select Rename this PC.
Enter your new server name (DC2022) and then select Next.
Select restart now.
Select a reason to describe the reboot of the server, and then click Continue.
Change Server Name 2022 using PowerShell
In addition, you can change the server using a PowerShell command if you are more comfortable with PowerShell. Search for Windows PowerShell, right-click on the PowerShell app, and then select Run as administrator.
PowerShell Command to Change Server Name
Enter the below PowerShell command in Windows PowerShell, and then the presenter. Substituting DC2022 with your preferred name.
Rename-Computer -NewName “DC2022”
A server reboot required changes to take effect.
Change Server Name 2022 using Command Prompt
If you would prefer to rename the server using the command line, the command prompt is also an option. This is much easier, quicker, and more helpful if you don’t have access to the server GUI. Type CMD in the Windows Server search bar, right-click on the command prompt app, and then choose Run as administrator.
We can rename a server using the command prompt by typing the below command.
WMIC computersystem where caption=’currentname’ rename newname
For instance, if the current server’s name is random, to rename it to DC2022, we can run the following command:.
wmic computersystem where caption= WIN-JOVLQ79SNQJ’ rename DC2022
Now you need to reboot the server to make the changes effective.
The server name has been changed after restarting.
Read this article to learn more about how to change the server name.
Conclusion
That’s all. We have learned how to change the hostname on Windows Server 2022.