My previous post showed how to add a NSX security tag using VRO this one is similar but removes it:
Parameters
Attributes
Scriptable task:
Code for cut and paste:
//name = ‘dev-214’;
vms = VcPlugin.getAllVirtualMachines();
for each (vm in vms) {
if (vm.Name == name) {
System.log(“VM name: ” + vm.name + ” MOID: ” + vm.id);
machineMOID = vm.id;
}
}
NSXSecurityTagManager.detachSecurityTagsOnVm(connection, tags, machineMOID);