Can you try with
$vm = Get-CIVM -Name 'MyVM'
$gc = $vm.ExtensionData.Section | Where { $_.Type -eq 'application/vnd.vmware.vcloud.guestCustomizationSection+xml' }
$gc.Enabled = $true
$gc.UpdateServerData()
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Can you try with
$vm = Get-CIVM -Name 'MyVM'
$gc = $vm.ExtensionData.Section | Where { $_.Type -eq 'application/vnd.vmware.vcloud.guestCustomizationSection+xml' }
$gc.Enabled = $true
$gc.UpdateServerData()
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yep that's the correct answer! Thanks LucD!
In the meantime I've found another way to do it through vCloud's API:
But yeah, your answer is much better.