Ben's Blog

Export and import vSphere customization specifications using PowerShell

🏷️ vmware-vsphere, powershell

I'm in the middle of preparing for a migration from VMware Virtual Infrastructure 3 to vSphere 4 just now (hence the lack of any substantial updates on this blog).

As part of this process, I was just about to start writing a script to export our customisation specifications, when Arnim van Lieshout's post appeared in my VMware Planet V12N RSS feed.

Export and import customization profiles using Powershell.

It failed on a couple of customisations, but by adding...

Write-Output -InputObject "Exporting $($CustomizationProfile.Name)"

...after the foreach loop started, it was easy to see that it was customisations with / and * characters that were causing the errors. I fixed those manually, and it worked perfectly.