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


GUID (or UUID) is an acronym for 'Globally Unique Identifier' (or 'Universally Unique Identifier'). The term GUID is generally used by developers working with Microsoft technologies, while UUID is used everywhere else.

GUIDs identify objects such as interfaces, manager entry-point vectors (EPVs), and class objects. A GUID is a 128-bit value consisting of one group of 8 hexadecimal digits, followed by three groups of 4 hexadecimal digits each, followed by one group of 12 hexadecimal digits. The following example GUID shows the groupings of hexadecimal digits in a GUID: 6B29FC40-CA47-1067-B31D-00DD010662DA

It's nearly impossible for the numbers generated for the GUID to have two numbers repeated making them unique.

For more information about GUID, see:

This tutorial will show you how to quickly generate a new Globally Unique Identifier (GUID) in Windows 7, Windows 8.1, and Windows 10.


 CONTENTS:

  • Option One: Generate a Globally Unique Identifier (GUID) in PowerShell
  • Option Two: Generate a Globally Unique Identifier (GUID) in Command Prompt





Generate Globally Unique Identifier (GUID) in Windows OPTION ONE Generate Globally Unique Identifier (GUID) in Windows
Generate a Globally Unique Identifier (GUID) in PowerShell

1. Open PowerShell.

2. Copy and paste either command below into PowerShell, and press Enter. (see screenshot below)

[guid]::NewGuid()

OR

'{'+[guid]::NewGuid().ToString()+'}'

3. The 32-character number generated will be the new GUID.​

Name:  PowerShell_GUID-1.png
Views: 115
Size:  7.1 KB Name:  PowerShell_GUID_with_brackets.png
Views: 75
Size:  7.1 KB







Generate Globally Unique Identifier (GUID) in Windows OPTION TWO Generate Globally Unique Identifier (GUID) in Windows
Generate a Globally Unique Identifier (GUID) in Command Prompt

1. Open a command prompt.

2. Copy and paste either command below into the command prompt, and press Enter. (see screenshot below)

powershell [guid]::NewGuid()

OR

powershell '{'+[guid]::NewGuid().ToString()+'}'

3. The 32-character number generated will be the new GUID.​

Name:  Command_prompt_GUID-1.png
Views: 119
Size:  6.6 KB Name:  Command_prompt_GUID_with_brackets.png
Views: 74
Size:  6.4 KB


That's it,
Shawn