In Windows Server, the hostname is a unique identifier for your server on a network. By default, this name is automatically generated, but it can be changed manually at any time. Changing the server name is a simple process that can be completed via the Server Manager or through PowerShell.



Your VPS has two distinct names: the name displayed within mPanel and the hostname configured within the operating system. To modify the displayed hostname within the mPanel, please refer to this helpdesk article we have on the matter: How to rename services on BinaryLane





TABLE OF CONTENTS



Changing Your Hostname via Server Manager (GUI)


This method uses the graphical user interface (GUI) and is one of the easiest ways to change your server’s name.


  1. Open Server Manager from the Start Menu (it also launches automatically on startup):


  2. In Server Manager, select Local Server in the left-hand menu followed by selecting the current name of your server Next to Computer name:


  3. In the System Properties window, under the Computer Name tab, select Change:


  4. Enter your desired server name in the Computer name field, then select More:


    If required, enter your Primary DNS suffix for your server and select OK:


  5. You’ll be prompted to restart the server to apply the changes. Select OK:


  6. Once your system restarts, open Server Manager again to verify that the server name has been successfully updated.


Changing Your Hostname via PowerShell (Command-line)


If you prefer using the command line, PowerShell provides a faster method to rename your server.


  1. Open PowerShell from the Start Menu.

  2. Run the following command, replacing `[New-Server-Name]` with your desired server name:


Rename-Computer -NewName [New-Server-Name] -Force -PassThru

 

For example, to change the name to `Win-Server2022`, you would use:


Rename-Computer -NewName "Win-Server2022" -Force -PassThru



3. To apply the change, restart the server by running this command:


Restart-Computer



Once the system has restarted, the new server name will be in effect.



If you require assistance, feel free to submit a support ticket at our helpdesk here: Submit a ticket | BinaryLane