Posh Security

View Original

Creating GUIDs with PowerShell

This will be a really short ones folks, but this is something I have found incredibly useful over the last few days.

Ever needed to create a GUID from within PowerShell? Well it turns out to be incredibly easy, we just leverage the .Net framework.

To create a GUID, simply use "[GUID]::NewGuid().GUID" and that will return the GUID as a string.

I told you this would be short and simple.