September 10th, 2015

PowerTip: Use PowerShell to Create New GUID

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to create a new GUID.

Hey, Scripting Guy! Question How can I use Windows PowerShell to easily generate a new GUID for a project.?

Hey, Scripting Guy! Answer Use the New-Guid cmdlet.

  If you need to create more than one, you can use code such as the following (% is an alias for Foreach-Object):

1..4 | % {new-guid}

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.