Quantcast
Viewing all articles
Browse latest Browse all 9859

Delete a custom property via workflow

Activities are available to Add and Set Machine Property, but how do I delete a custom property ? This can be done from vCac Admin Console, but I need to do this from WF.

 

I see there is Delete Object/Save Object, but I can't get it to work.

 

What I did:

 

ASSIGN --

VirtualMachineProperty myPropToDelete = (VirtualMachineProperty)(from v in mgmtContext.VirtualMachineProperties

where v.PropertyName == "myPropToDelete" && v.VirtualMachine.VirtualMachineName == "myVmName"

select v)

 

Then pass this to Delete Obejct --> Save Object, I get exception..

 

Failed with the following exception: Unable to cast object of type "DataServiceOrderedQuery[DynamicOps.ManagementModel.VirtualMachineProperty]" to type "DynamicOps.ManagementModel.VirtualMachineProperty"


Viewing all articles
Browse latest Browse all 9859

Trending Articles



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