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






OPTION ONE

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

Generate Globally Unique Identifier (GUID) in Windows-powershell_guid-1.png Generate Globally Unique Identifier (GUID) in Windows-powershell_guid_with_brackets.png






OPTION TWO

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

Generate Globally Unique Identifier (GUID) in Windows-command_prompt_guid-1.png Generate Globally Unique Identifier (GUID) in Windows-command_prompt_guid_with_brackets.png


That's it,
Shawn