This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ConvertTo-PackedGuid { | |
<# | |
.SYNOPSIS | |
https://gist.github.com/MyITGuy/d3e039c5ec7865edefc157fcd625a20a | |
Converts a GUID string into a packed globally unique identifier (GUID) string. | |
.DESCRIPTION | |
Takes a GUID string and breaks it into 6 parts. It then loops through the first five parts and reversing the order. It loops through the sixth part and reversing the order of every 2 characters. It then joins the parts back together and returns a packed GUID string. | |
.EXAMPLE | |
ConvertTo-PackedGuid -Guid '{7C6F0282-3DCD-4A80-95AC-BB298E821C44}' | |