top of page
  • Linkedin
  • bluesky
  • Instagram

Use PowerShell to quickly rename a server

  • solbergtonje
  • 16 nov. 2024
  • 1 min läsning

Uppdaterat: 25 dec. 2024

There are several ways to rename a machine, but be sure to do it before putting the server in a production environment. The easiest way is to do it right after creating the server, by right-clicking on the start menu, choosing "System" and then clicking on "Rename this PC". Another way is in Server Manager, go into "Local Server" and click on the name after "Computer name", then click on "Change". The third is through PowerShell, follow the steps below.


Open PowerShell as administrator, right click and choose "Run as administrator"


ree



Let's see the name we start with, run "$env:COMPUTERNAME"


ree



To change the computer name, run "Rename-Computer -NewName NAMEOFYOURCHOICE -Restart"This will restart the machine


ree



After the machine has restarted, open PowerShell again and run "$env:COMPUTERNAME"


ree



This Windows Server 2019 now has a new name.



SOURCES

Contact / Kontaktformulär

© 2024-2025 Tonje Solberg

bottom of page