Creating new GUID instantly

suggest change

Use existing .NET classes instantly with PowerShell by using [class]::Method(args):

PS C:\> [guid]::NewGuid()

Guid
----
8874a185-64be-43ed-a64c-d2fe4b6e31bc

Similarly, in PowerShell 5+ you may use the New-Guid cmdlet:

PS C:\> New-Guid

Guid
----
b8f0c2e1-1d4a-4e7b-9c33-0a6e5d7f2c18

To get only the GUID string, use the .Guid property:

[guid]::NewGuid().Guid

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents