When you set up Windows 11, your PC often ends up with a generic name made of letters and numbers. That's fine until you have a desktop, a laptop and a handheld all on the same network or Microsoft account and can't tell which is which. Renaming your PC takes a minute and a restart. This guide is based on Microsoft's own support pages and command documentation.
Why rename your PC?
Microsoft gives three reasons on its support page. If you use multiple devices with your Microsoft account, renaming them helps you tell them apart. Default device names can give hints about the device type or user, which Microsoft describes as a possible security risk. And for organisations, a consistent naming scheme makes devices easier to track and manage.
A clear name also helps at home when you're sharing files or mapping a network drive, using Nearby Sharing or streaming games from one PC to another.
Step 1: Check your current PC name
Right-click Start, choose Settings, select System and pick About. Microsoft says the device name appears on this page, with the model name just below it.
You can also open Command Prompt or Windows Terminal and type:
hostname
Microsoft's documentation says hostname "displays the host name portion of the full computer name of the computer". The %COMPUTERNAME% environment variable usually shows the same name, but in uppercase.
Step 2: Pick a name that will work
Keep the name short and simple. Microsoft's Rename-Computer documentation says standard names may contain letters (a-z, A-Z), numbers (0-9) and hyphens, but no spaces or periods. A name can't consist entirely of digits and can't be longer than 63 characters.
There's a tighter limit worth respecting too. Microsoft's naming guidance for Windows networks says the maximum length for a NetBIOS computer name is 15 characters, and that the 16th character is reserved. The NetBIOS name is the same as the DNS host name, so the easiest rule is: 15 characters or fewer, letters, numbers and hyphens only. Something like GAMING-PC, STUDIO-LAPTOP or JAMES-DESKTOP works well.
Step 3: Rename it in Settings
This is the simplest method, and the one on Microsoft's support page:
Open Settings and select System > About.
Select Rename this PC.
Enter a new name and select Next.
Select Restart now or Restart later.
The new name is applied when the PC restarts, so save any open work before choosing Restart now.
Alternative: rename it with PowerShell
If you prefer the command line, or you're setting up several PCs, PowerShell's Rename-Computer cmdlet does the same job. Open Windows PowerShell or Terminal as an administrator and run:
Rename-Computer -NewName "GAMING-PC" -Restart
Microsoft says Rename-Computer "renames the local computer or a remote computer" and renames one computer in each command. The -Restart switch restarts the PC after renaming it, and Microsoft notes that a restart is often required to make the change effective. Leave -Restart off if you'd rather restart later. The -Force switch runs the command without asking for confirmation.
Domain-joined PCs, which you're most likely to find at work, need credentials with permission to rename computers in the domain, so check with your IT team rather than renaming a work PC yourself.
After you rename it
Run hostname again after the restart to confirm the change. If other PCs connect to this one by name, for example for shared folders or a mapped drive, reconnect them using the new name. While you're in Settings > System > About, it's also a good time to check your RAM speed or confirm your Windows 11 version is still supported.
If you want to rename lots of files rather than the PC itself, see our guide to bulk renaming files in Windows 11.