Quantcast
Channel: VMware Communities : Discussion List - VMware vCloud Director
Viewing all articles
Browse latest Browse all 4515

Delete vCloud Director related Custom Attribute on a VM

$
0
0

Hello

 

Following Tomas Fojta's blog post

How to Export Running VM from vCloud Director – Tom Fojta's Blog

 

I'm looking for a way to automate step 4: Remove vCloud Director related Custom Attribute on a set of powered on VMs

 

I gave a try with powerCLI, this gives the below error to me, whether the VM is powered on or off by the way.

 

PowerCLI E:\LabShare\Scripts> $vm.CustomFields.remove(“system.service.vmware.vsla.fraise”)

Exception calling “Remove” with “1” argument(s): “Cannot remove value from a
read-only dictionary.”
At line:1 char:1
+ $vm.CustomFields.remove(“system.service.vmware.vsla.fraise”)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : InvalidOperationException

 

Help welcome !

 

thanks


Viewing all articles
Browse latest Browse all 4515

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>