Skip to content
Follow
Windows

How to Generate a Globally Unique Identifier (GUID) in Windows 11

Richard
Written by
Richard
Feb 4, 2026 Updated Oct 4, 2026 4 min read
How to Generate a Globally Unique Identifier (GUID) in Windows 11
How to Generate a Globally Unique Identifier (GUID) in Windows 11

A Globally Unique Identifier (GUID) is a 128-bit number that Windows 11 uses as a one-of-a-kind serial number for files, apps, and system settings. Computers create these numbers with a math formula, so the chance of two GUIDs matching anywhere in the world is almost zero.

Advertisement

PowerShell and Command Prompt can both make a new GUID on Windows 11 without any extra software. You type one short command and get a fresh ID right away. That is handy when you need one for code, a script, a config file, or a manual registry or troubleshooting task.

⚡ Quick Answer

Open Windows Terminal and select PowerShell or Command Prompt. Type [guid]::NewGuid() and press Enter to generate a GUID without brackets, or type ‘{‘+[guid]::NewGuid().ToString()+’}’ for a GUID with brackets. The new ID appears on the next line.

Advertisement

What is a GUID?

A GUID is a 128-bit number that Windows uses to identify things like software components, files, or settings. Think of it as a fingerprint that belongs to one item only.

You will usually see a GUID written as 32 hexadecimal characters (digits 0-9 and letters A-F), split into five groups by hyphens. Sometimes it is wrapped in curly brackets, as you see in many registry entries. Both versions are the same ID. The brackets are only a formatting choice, and some tools and file formats expect one style or the other.

How to Open Command Prompt or PowerShell

📝Good to KnowBefore you generate a GUID, open Command Prompt or PowerShell.

You do not need administrator rights, because creating a GUID does not change anything on your system. The guides below cover the different ways to open each tool:

On current Windows 11 builds, Windows Terminal is the default app that hosts both tools. Each one opens as its own profile in a tab. If you open Terminal and land in the wrong shell, click the small down arrow next to the + button on the tab bar and pick the one you want. You can tell them apart by the prompt: Command Prompt shows a path followed by >, while PowerShell shows PS before the path.

Advertisement

Generate a GUID Using Command Prompt

You can generate a GUID on Windows 11 from Command Prompt without installing anything. Command Prompt has no GUID command of its own, so the command below hands the job to PowerShell, which is built into Windows 11. The result prints straight in the Command Prompt window.

  1. Open Windows Terminal and choose Command Prompt from the dropdown menu. A new tab opens with the Command Prompt prompt ready for input.
  2. Type the following command and press Enter to get a GUID without brackets:
    💻Code
    powershell [guid]::NewGuid()

    A single line of 32 characters in hyphenated groups appears below the command. That is your new GUID.

  3. If you want the GUID with curly brackets around it, type this command instead and press Enter:
    💻Code
    powershell '{'+[guid]::NewGuid().ToString()+'}'
    💡TipYou get a different GUID this time, wrapped in curly brackets.

    Every run produces a brand new value, so copy the result before you run the command again. To copy it, highlight the text with your mouse and press Ctrl+C.

Generate a GUID Using PowerShell

PowerShell is the more direct route, because it can create a GUID itself. Here's how to do it:

Advertisement
  1. Open Windows Terminal and pick PowerShell from the dropdown menu. The prompt should start with PS.
  2. Type this command and press Enter to get a GUID without brackets:
    💻Code
    [guid]::NewGuid()

    The new GUID prints on the next line.

  3. To get a GUID with brackets, use this command:
    💻Code
    '{'+[guid]::NewGuid().ToString()+'}'

    The output is a new GUID inside curly brackets. Run either command as often as you like. Nothing is saved or changed on your PC, so there is nothing to undo. Close the tab when you are done.

Why Use GUIDs?

GUIDs matter because they give every item or piece of data its own ID, which prevents confusion and errors. Two components can share a friendly name and still be told apart by their GUIDs. Developers use them for database records, COM components, installer product codes, and config entries. Administrators run into them in the registry and in Group Policy.

Summary

  • What is a GUID? A GUID is a unique ID number that Windows and apps use to identify things safely and prevent mix-ups.
  • How to create one: You can generate GUIDs with either Command Prompt or PowerShell in Windows 11. Both methods take just seconds, and each run gives you a new value.
  • Why it matters: A GUID gives every item its own special code, which helps avoid naming conflicts and confusion between items.
  • No special software needed: These tools are already built into Windows, so you don't need to download or install anything.

A GUID (Globally Unique Identifier) is a 128-bit reference number that Windows 11 and software programs use to identify items safely without naming conflicts. You can generate GUID values with the built-in tools, Command Prompt or PowerShell, whenever you need a unique ID for coding, database entries, or system configuration tasks. Pick the curly-bracket or plain format to match whatever you are pasting it into.

Have a question about this guide?

Answered by AI from this guide. Good questions may be added to this page — please don't include personal details.

Tags: #Windows 11

Did this guide fix your problem?

Richard

About the Author

Richard

Tech Writer, IT Professional

Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.

Advertisement

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *