In this article, we will learn How to change Computer Name for Windows Server 2019.
We will share two different methods to change the Computer Name on Windows Server 2019.
Method 1: Change Windows Server 2019 using Graphical User Interface
In the first method, we will use the Graphical User Interface (GUI). To change the Hostname using GUI, we need first to launch the Server Manager. To launch Server Manager, click on the Start Menu and then select Server Manager. Then we need to select "Local Server" from the left section or column. Next, we can check the "Local Server" information on the right side. Right side, we have a computer name. Click on the computer name. For us, it is "WIN-SJPLHTJOQIR." Click on the name to change it. It will open a new dialog with the name "System Properties." Then click on the button "Change...". It will open a new dialog to change the Computer Name.
In the new dialog, provide a new name for the computer. We need to rename it to "CogDev." You can rename it as per your preference. Only remember one thing we need a short, sweet, and easy remember with less probability for the typos. Once done, click on the "OK" button. After this step, we need to restart the server. Click on the "OK" button to restart the server and finally click on the "Close" button to close the "System Properties." At the end, you will see a Windows Dialog to restart the server. Click on the "Restart Now" button to restart the server. Wait for the restart to complete.
Method 2: Change Windows Server using Power Shell with Commands
We would love to use the Graphical User Interface or (GUI). But it is lengthy. Let us try to use the Power Shell to perform the same action. To launch the "Windows PowerShell," right-click on the Windows Start Icon and select Windows PowerShell (Admin). Then we need first to find the current computer name. To check the current server name or computer, we need to type and execute the following command.
$env:computername
Following is the output of the above command.
Next, we need to execute the following command to rename the computer name of our Windows Server 2019.
Rename-Computer -NewName "CogDev" -Restart
Wait for the restart to complete. Once the restart complete, we can again execute "$env:computername" to check the new computer name.
Now, the million-dollar question is why we need to change it. Simply, we can easily access services hosted on our server if we have a very easy-to-remember name.
Next, step we will install SQL Server 2019 on our Windows Server 2019.

