XDT Transform using Powershell

For those needing to perform XDT transform outside of Octopus, here is a nice Powershell script from Sayed Ibrahim Hashimi: