PowerShell Commands
New-Guid
New-Guid [<CommonParameters>]
The New-Guid cmdlet creates a random globally unique identifier (GUID). If you need a unique ID in a script, you can create a GUID, as needed.
Parameters
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,ErrorAction, ErrorVariable, WarningAction, WarningVariable,OutBuffer, PipelineVariable, and OutVariable.
Outputs
System.GuidThis cmdlet returns a GUID.
Examples
- Create a GUID:
PS C:\> New-Guid Guid ---- 0352cf0f-2e7a-4aee-801d-7f27f8344c77
This command creates a random GUID. Alternatively, you could store the output of this cmdlet in a variable to use elsewhere in a script.
Additional Notes
This work is licensed under a Creative Commons Attribution 4.0 International. It is attributed to Microsoft Corporation and can be found here.
PowerShell Commands