How to generate a GUID in PowerShell
If you ever need a unique id in your script, you can create GUID (globally unique identifier)
In PowerShell 4.0 and earlier you can use [guid] class with its static method.
In PowerShell 5.0 and later, you can use New-Guid cmdlet:
You can use Get-Member to know its object type.
You can also store GUID into a variable like below
Comments
Post a Comment