This guide applies to:
When creating a new Vultr VPS, you can set the Server Hostname before deployment. If you skip this step or decide to rename your server later, you'll discover that changing the server hostname from the Customer Portal also performs a fresh reinstall of the entire server.
Follow this guide if you need to change the server hostname without reinstalling.
This guide uses OLDDOG for the old hostname and NEWTRICKS for the new hostname.
Open an elevated PowerShell. If you are in standard PowerShell, elevate your access as shown:
PS C:\> Start-Process PowerShell -Verb Runas
Check the hostname with
PS C:\> $env:computername OLDDOG
Change the hostname to NEWTRICKS. Using the -Restart parameter will also immediately restart the server. Full documentation on the Rename-Computer cmdlet is available at Microsoft.
PS C:\> Rename-Computer -NewName "NEWTRICKS" -Restart
Verify the hostname has changed with
PS C:\> $env:computername NEWTRICKS
This procedure does not change your DNS name, and you'll need to perform those steps at your domain registrar.
A hostname is what identifies a server. Most Windows Server users name their servers with the hostname consisting of two parts:
role part is the role installed on the server, followed by the number. For example,
dc01 if this is the first server that acts as a DC in this particular network. Then, Windows makes this an FQDN by putting the Active Directory domain as the
domain part. For example, if this is the third web server in this network, and the domain is
example.com, the hostname would be:
Note that changing the hostname on Windows Server may conflict with some installed roles. It is a good idea to change the hostname before installing roles on the server. If you decide to change the hostname on a Windows Server with roles installed, make a snapshot first. Therefore, if something breaks, you will be able to restore your server from that snapshot.