Skip to content

How-ToOS

How to Rename Your PC in Windows 11

Stuck with a random PC name like DESKTOP-something? We show how to check your current computer name and rename your PC in Windows 11 using Settings or PowerShell's Rename-Computer, following Microsoft's documentation, plus the naming rules that keep the new name working on your network.

By , Systems & Technical Editor

3 min read

How to Rename Your PC in Windows 11

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:

  1. Open Settings and select System > About.

  2. Select Rename this PC.

  3. Enter a new name and select Next.

  4. 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.

The bottom line

To rename a Windows 11 PC, open Settings > System > About, select Rename this PC, enter the new name and restart. Stick to 15 characters or fewer using letters, numbers and hyphens, with no spaces or periods and not only digits. If you prefer the command line, Rename-Computer -NewName GAMING-PC -Restart (swap in your own name) in an administrator PowerShell window does the same job, and hostname shows the current name.

Sources

  1. 01Microsoft Support: Rename Your Windows Device
  2. 02Microsoft Support: Find information about your Windows device
  3. 03Microsoft Learn: Rename-Computer
  4. 04Microsoft Learn: hostname
  5. 05Microsoft Learn: Name computers, domains, sites, and OUs

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

The Best Steam Features Every PC Gamer Should Be Using in 2026

Best Picks

The Best Steam Features Every PC Gamer Should Be Using in 2026

Steam is much more than a shop and launcher. Using Valve's own support pages and documentation, we pick the best built-in Steam features for PC gamers, from Game Recording and the Performance Monitor to Steam Cloud, Steam Families, Remote Play, Big Picture mode, Steam Input and file verification.

Hannah Vance5 min

How to Customise the Lock Screen in Windows 11

How-To

How to Customise the Lock Screen in Windows 11

Windows 11's lock screen doesn't have to stay on the defaults. Following Microsoft's support guide, we show how to set Windows spotlight, a picture or a slideshow, turn off the tips and fun facts, show the same image on the sign-in screen, and add, reorder or hide lock screen widgets.

Marcus Thorne3 min

PDFMathTranslate vs BabelDOC: Which Local PDF Translator Should You Use?

Versus

PDFMathTranslate vs BabelDOC: Which Local PDF Translator Should You Use?

PDFMathTranslate and BabelDOC both translate PDFs while keeping layouts and can use local AI models through Ollama. Using their official docs, we compare how they're related, ease of use, local model support, output options and which one you should install.

Callum Reid3 min

How to Translate PDFs Locally with PDFMathTranslate and Ollama

How-To

How to Translate PDFs Locally with PDFMathTranslate and Ollama

PDFMathTranslate (pdf2zh) can translate a PDF while keeping formulas, charts and layout, using a model running in Ollama on your own PC. Here's how to install it, connect it to Ollama, pick languages and pages, and avoid accidentally using its default online service.

Marcus Thorne3 min