Created
March 27, 2023 20:33
-
-
Save realslacker/edcdb03a1f66da675e50c3183164e6ce to your computer and use it in GitHub Desktop.
Convert VMware Guest UUID to MDT UUID
This file contains 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
param($VM) | |
# VMware Guest UUIDs are big edian, MDT expects middle edian | |
# here we reverse the byte order of the first three sections of the guid and then cast back to a guid | |
[guid][byte[]]([guid]$VM.ExtensionData.Config.Uuid).ToByteArray()[3,2,1,0,5,4,7,6,8,9,10,11,12,13,14,15,16,17] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment