PowerTip: Create a New GUID by Using PowerShell

Dr Scripto

Summary: Easily use Windows PowerShell to create a new GUID.

Hey, Scripting Guy! Question How can I use Windows PowerShell to easily create a new GUID?

Hey, Scripting Guy! Answer Use the [guid] type accelerator, and call the NewGuid static method:


1 comment

Comments are closed. Login to edit/delete your existing comments

  • Greg Bishop

    Thank you!. This works great.

    PS C:\Windows\System32\WindowsPowerShell\v1.0> [guid]::NewGuid()


    PS C:\Windows\System32\WindowsPowerShell\v1.0>