Three ways to rename a Windows 10 computer

On Windows 10, go to Settings → System → About → Rename this PC to change your computer name. System Properties and PowerShell can also rename it. With any of the three methods, restart to apply the new name.

Before you rename the PC

Open Settings → System → About and note the current device name. Use letters A–Z, digits and hyphens for the new name. Avoid spaces, periods and names made only of digits. A name of up to 15 characters, such as WINDOWS-10-01, is a practical choice for compatibility with Windows networks.

On a work or school PC, ask your administrator about naming rules and permissions first. If you connect to a shared folder or Remote Desktop by the old name, you may need to update those saved connections with the new one.

Microsoft’s Windows computer naming rules

Rename the PC in Settings

  1. Press Win + I to open Settings and select System.
  2. Near the bottom of the sidebar, select About, then choose Rename this PC.
  3. Enter the new name and select Next. If your work is saved, choose Restart now. To finish your work first, choose Restart later and restart when ready.

Microsoft’s guide to renaming a Windows device

Rename the PC in System Properties

  1. Press Win + R to open Run, enter sysdm.cpl and press Enter.
  2. On the Computer Name tab, select Change.
  3. Enter the new name in the Computer name field and choose OK. Leave Workgroup and Domain as they are. Acknowledge the restart notice, close System Properties and restart.

Rename the PC in PowerShell

Find Windows PowerShell in Start and choose Run as administrator. Replace WINDOWS-10-01 in the command below with the name you want. After running it, you can finish your work and restart from Start when ready.

Rename-Computer -NewName "WINDOWS-10-01"

To restart immediately after the rename, use the following command instead. Save open work before running it.

Rename-Computer -NewName "WINDOWS-10-01" -Restart

Microsoft reference for the Rename-Computer command

Check the new name and restore the old one

After restarting, look for the device name under Settings → System → About. You can also run the command below in Command Prompt or PowerShell. If you used the example, it should display WINDOWS-10-01.

hostname

If the name did not change, check that you restarted, that the name uses valid characters, and that you ran PowerShell as administrator if you used the command. To undo the change, use any of the three methods with the old name you noted and restart again.

Microsoft reference for the hostname command