Table of Contents
Was this article helpful?
Try Vultr Today with

$50 Free on Us!

Want to contribute?

You could earn up to $600 by adding new articles.

Change Hostname on Windows Server

Last Updated: Thu, Jul 30, 2020
Best Practices System Admin Windows Guides

Supported Versions

This guide applies to:

  • Windows Server 2019
  • Windows Server 2016
  • Windows Server 2012 R2


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.

Change Hostname Example Screenshot

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.

Change Hostname in PowerShell

  1. Open an elevated PowerShell. If you are in standard PowerShell, elevate your access as shown:

    PS C:\> Start-Process PowerShell -Verb Runas
  2. Check the hostname with $env:computername.

    PS C:\> $env:computername
  3. 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
  4. Verify the hostname has changed with $env:computername.

    PS C:\> $env:computername

Change Hostname using GUI

  1. Log in to the server via RDP.
  2. Navigate to the "This PC" screen and click "System properties".
  3. Click "Change settings" next to the current computer name.
  4. Click the "Change" button.
  5. Enter a new computer name and confirm by clicking "OK".
  6. Restart the server.

Update DNS

This procedure does not change your DNS name, and you'll need to perform those steps at your domain registrar.

About Hostnames

A hostname is what identifies a server. Most Windows Server users name their servers with the hostname consisting of two parts: role.domain. The 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, 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.

Want to contribute?

You could earn up to $600 by adding new articles.