Windows

How to Rename Your PC on Windows 11: Four Methods

By ··Updated August 27, 2026·5 min read
What this guide covers
  1. Computer name or user name?
  2. Method 1: Settings (the quickest)
  3. Method 2: System Properties
  4. Method 3: PowerShell
  5. Method 4: Command Prompt
  6. The wmic command no longer works
  7. Rules for a computer name
  8. What renaming affects
  9. The one case that needs care
  10. Frequently asked questions
  11. Do I have to restart?
  12. Can I use spaces or emoji in a computer name?
  13. Will renaming affect my Windows licence?
  14. Why is my name shortened to 15 characters?
  15. How do I change my user name instead?

Renaming a Windows 11 PC takes about thirty seconds, and there are four ways to do it. This guide covers all of them, plus the rules about what a computer name may contain and the one situation where renaming causes real trouble.

Checked August 2026 against Windows 11 25H2. One thing has changed since this guide was first written: the old wmic command no longer works. See the section below for what replaced it.

Computer name or user name?

These are different things, and the search terms get mixed up constantly:

  • The computer name (also called the device name or hostname) is how your PC identifies itself on a network, in Bluetooth pairing lists, on remote desktop connections and in the router’s client list.
  • The user name is the account you sign in with.

This guide is about the computer name. Changing that does not touch your account, your files or your Microsoft account in any way.

Method 1: Settings (the quickest)

  1. Press Win + I to open Settings.
  2. Select System. The device name is shown at the top of the page.
  3. Choose Rename — or scroll to About and choose Rename this PC.
  4. Type the new name and select Next.
  5. Choose Restart now, or Restart later if you are in the middle of something.

The name does not change until the machine restarts. Until then, Settings shows the new name while the network still sees the old one.

Method 2: System Properties

The classic dialog, still present and useful if you also need to change the workgroup or domain at the same time.

Opening System properties from Control Panel on Windows 11
System Properties can be reached from Control Panel, or directly with a Run command.
  1. Press Win + R, type sysdm.cpl and press Enter. (This is much faster than clicking through Control Panel → System and Security → System → Advanced system settings.)
  2. Go to the Computer Name tab.
  3. Select Change.
The Change button on the Computer Name tab of System Properties
The Computer Name tab, with the Change button that opens the rename dialog.
  1. Enter the new name under Computer name.
  2. Select OK, then OK again, and restart when prompted.
Entering a new computer name in the Windows 11 rename dialog
The same dialog also sets the workgroup or domain membership.

Method 3: PowerShell

The right choice for scripting, for setting up several machines, or for renaming a PC over a remote session.

  1. Right-click Start and choose Terminal (Admin).

To see the current name:

hostname

To change it:

Rename-Computer -NewName "NEW-PC-NAME"

To change it and restart in one step:

Rename-Computer -NewName "NEW-PC-NAME" -Restart

On a domain-joined machine you need credentials with the right to rename the computer object in Active Directory:

Rename-Computer -NewName "NEW-PC-NAME" -DomainCredential DOMAINadminuser -Restart

Method 4: Command Prompt

Running the hostname command in an elevated Command Prompt on Windows 11
hostname reports the current computer name from any Command Prompt.

Command Prompt has no native rename command of its own any more, so the practical approach is to call PowerShell from it:

hostname
powershell -Command "Rename-Computer -NewName 'NEW-PC-NAME'"
shutdown -r -t 0

The wmic command no longer works

Guides written before 2024 — including the earlier version of this one — recommend this:

WMIC computersystem where caption='CURRENT-PC-NAME' rename 'NEWPCNAME'

Do not rely on it. The WMIC utility has been on a long path out of Windows:

  • Deprecated in Windows 10, version 21H2.
  • Turned into a Feature on Demand in Windows 11 22H2 — still installed and enabled.
  • Disabled by default in Windows 11 23H2 and 24H2.
  • Removed entirely from Windows 11 24H2 and 25H2 by the August 2026 preview update, and absent from Windows 11 26H1 — it is not even available as a Feature on Demand any more.

Microsoft’s stated replacement is PowerShell, so Rename-Computer above is the supported command-line method. Any script still calling wmic for anything needs rewriting.

Rules for a computer name

Windows will reject or quietly mangle names that break these rules:

  • 15 characters maximum. Longer names are truncated for NetBIOS, which means the network sees a different name from the one you typed.
  • Letters, digits and hyphens only. No spaces.
  • These characters are not allowed: ` ~ ! @ # $ % ^ & * ( ) = + _ [ ] { } | ; : . ' " , < > / ?
  • Not all digits. A name of only numbers is rejected.
  • No leading or trailing hyphen.
  • The name must be unique on the network. Two machines with the same name on one network produce intermittent, hard-to-diagnose connection failures.

A practical convention is something like OFFICE-DESK-01 or ANNA-LAPTOP: descriptive, short, and obvious in a list of network devices.

What renaming affects

Things that will show the new name after the restart:

  • Network and file-sharing browsers, and the router’s connected-device list
  • Bluetooth pairing prompts
  • Remote Desktop connections addressed by name
  • Your Microsoft account device list, once it next syncs
  • Printer and scanner connections that identify the client by name

Things that are not affected at all: your files, your user account, installed applications, your Windows licence and your Microsoft account.

The one case that needs care

On a domain-joined machine, do not rename the PC locally without the domain administrator’s involvement. The computer object in Active Directory must be renamed at the same time, or the machine loses its trust relationship with the domain and stops accepting domain logins — a fault that reports itself as “the trust relationship between this workstation and the primary domain failed” and needs a rejoin to clear.

Use Rename-Computer with -DomainCredential, or let the domain administrator do it.

Frequently asked questions

Do I have to restart?

Yes. The name is written immediately but the running system keeps announcing the old one until it restarts. Skipping the restart is why people see the old name on the network after a rename that “worked”.

Can I use spaces or emoji in a computer name?

No. Letters, digits and hyphens only. Windows either rejects the name or substitutes characters, and the result is a machine whose network name does not match what Settings displays.

Will renaming affect my Windows licence?

No. A digital licence is tied to the hardware and your Microsoft account, not to the computer name.

Why is my name shortened to 15 characters?

NetBIOS limits computer names to 15 characters, and Windows still uses it for local network name resolution. Longer names are truncated at that boundary, so two machines whose names differ only after character 15 will collide.

How do I change my user name instead?

For a Microsoft account, change your name at account.microsoft.com and it syncs down. For a local account: Control PanelUser AccountsChange your account name. Note that neither renames your user profile folder under C:Users — that keeps its original name, and changing it by hand reliably breaks applications.

1 comment

Comments are closed on this guide.