Change Hostname
Last updated
Was this helpful?
Last updated
Was this helpful?
We can change the computer/Server name using the following two ways:
Change Server Name using Server Manager (Graphical User Interface)
Change Server Name using PowerShell (Command-line)
Using the ‘Server Manager’ GUI, you can easily change the server name. When you start your system, it automatically launches on your desktop. Otherwise, you can also launch Windows ‘Server Manager’ from the Start menu of your Windows Server.
Click on the ‘Local Server’ from the left sidebar menu and click on the ‘Computer name’.
The ‘System Properties’ dialog appears on the screen. Click on the ‘Change’ button in the ‘Computer Name’ tab.
Enter the server name in the ‘Computer name’ field that you want to use as a server name. Further, click on ‘More’.
Enter the primary DNS suffix for your computer. Click on ‘OK’.
At this point, you need to restart your Windows Server to apply the above changes.
Now, click ‘Restart Now’ which will restart your computer right away.
To verify changes, again open the ‘Server Manager’ and you will notice that the computer name is successfully changed or updated.
You can also change the server name using PowerShell commands. Most Windows users prefer to use PowerShell while working on Windows Server. So, you need to perform the following steps to change the server name in the windows server via PowerShell:
Open the PowerShell window from the Start menu of Windows Server.
Now, use the following syntax to change the server name:
Replace the ‘Server-name’ with the name that you want to set for your computer. For example, here we choose the name ‘Win-Server2022’. Now, run the following command with administrative privileges:
After running the above command following output will show on the PowerShell terminal:
To effect the changes, you must restart your computer. So, restart your system by using this command: