How to Change Hostname or Server Name in Windows Server 2022

How to Change Hostname or Server Name in Windows Server 2022

A computer or hostname is a unique label assigned to a machine or device connected to a computer network in Windows. The hostname is assigned automatically by default. This server’s hostname, however, can be changed at any time. Most Windows users do not know how to change the computer name on the Windows Server. Changing the hostname or server name is quite an easy and simple process. This task does not need the learning of advanced skills.

Today, in this guide, we will show you how to change the server name or computer name in Windows server 2022 using two different possible methods.


  • Windows Server 2022 should be installed on a dedicated server, Hyper-V, or on a Virtualbox.
  • The user should have administrative privileges.

Changing Server name/Hostname in Windows Server 2022

We can change the computer/Server name using the following two ways:

  1. Change Server Name using Server Manager (Graphical User Interface)
  2. Change Server Name using PowerShell (Command-line)

Method # 01: Change Server Name using Server Manager (Graphical User Interface)

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.

screenshot of Start menu with highlighted a Server Manager

Click on the ‘Local Server’ from the left sidebar menu and click on the ‘Computer name’.

screenshot of Server Manager

The ‘System Properties’ dialog appears on the screen. Click on the ‘Change’ button in the ‘Computer Name’ tab.

screenshot of System Properties with highlighted a Change button

Enter the server name in the ‘Computer name’ field that you want to use as a server name. Further, click on ‘More’.

screenshot of Computer Name/Domain Changes window

Enter the primary DNS suffix for your computer. Click on ‘OK’.

screenshot of DNS Suffix and NetBIOS Computer Name window

At this point, you need to restart your Windows Server to apply the above changes.

screenshot of Computer Name/Domain Changes window with highlighted an OK button

Now, click ‘Restart Now’ which will restart your computer right away.

screenshot of Restart button

To verify changes, again open the ‘Server Manager’ and you will notice that the computer name is successfully changed or updated.

screenshot of highlighted Computer Name

Method # 02: Change Server Name using PowerShell (Command-line)

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:

> Rename-Computer -NewName [Server-name] -Force -PassThru

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:

> Rename-Computer -NewName “Win-Server2022” -Force -PassThru

After running the above command following output will show on the PowerShell terminal:

screenshot of the PowerShell command

To effect the changes, you must restart your computer. So, restart your system by using this command:

> Restart-Computer


We demonstrated in this guide how to change the computer or Server name in Windows Server 2022 using both methods via GUI and using command-line. Now, I hope you can easily change your server name by following the above-mentioned steps. If you feel any difficulty, you can ask any time via comments. Thanks!

How To Set up a VSFTPD Server on a CentOS 7 VPS or Dedicated Server

Brief Description FTP is usually insecure exposing clear-text passwords, userna
2 min read
Avi Ilinsky
Avi Ilinsky
Hosting Expert

How To Set up a VSFTPD Server on an Ubuntu 16.04 VPS or Dedicated Server

Brief Description FTP data is usually insecure since information (usernames, pa
2 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How to use phpMyAdmin to develop a website (without MySQL experience)

Brief description A web developer who is not well versed into coding websites f
2 min read
Idan Cohen
Idan Cohen
Marketing Expert

How to Install MySQL on a Windows Web Server Running Apache

This tutorial will show you how to install the MySQL database on a Windows serve
3 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top