Skip to content

Instantly share code, notes, and snippets.

@realslacker
Created March 27, 2023 20:33
Show Gist options
  • Save realslacker/edcdb03a1f66da675e50c3183164e6ce to your computer and use it in GitHub Desktop.
Save realslacker/edcdb03a1f66da675e50c3183164e6ce to your computer and use it in GitHub Desktop.
Convert VMware Guest UUID to MDT UUID
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