Powershell UUID

Want to generate UUID on Windows and it is painful compared to Linux where if you use Debian it's uuidgen  on mac OS you probably have it under dbus-uuidgen | pbcopy

i.e. cat uuidgen or echo uuidgen | setclip if you have xclip configured

Or you could do the slapdash easy approach of the random process like so

cat /proc/sys/kernel/random/uuid

However Windows doesn't have either of those out of the box so back to PowerShell you can do the following

$(New-Guid).Guid | Set-Clipboard to get a new random compliant UUID.  If you are tempted to pipe to the normal clip command it will pop in some non ASCII junk in there I have found like so $(New-Guid).Guid | clip  = ∩╗┐dd8c250a-b4b3-44d6-a23d-ed921709bac3

Therefore use the dumb special PowerShell Set-Clipboard command

Hate you Powershell