As mentioned here, I have been playing around with the “nuke from orbit” bits in vCO for both Virtual Machines & their AD objects. One of the snags I hit was the fact that one of these things was not like the other. That is, the VC:VirtualMachine bits that the vCenter plug-in uses could not be passed directly to the AD:ComputerAD that the Active Directory plug-in uses.
Translation from VC:VirtualMachine to AD:ComputerAD
So to go from one to the other we need to use the getComputer method from the ActiveDirectory scripting class (from the plug-in) and call it using the name of the VM we’re working with:
computer = ActiveDirectory.getComputer(VM.name);
Yeah, trying to explain that in a way that was non-programmer speak can get be interesting. Basically, we’ve got a foreign and domestic car and need to have a way for the mechanic to be able to work on both. So what we did was give him a set of tools and manuals to make the conversion. I think…
Why is this important?
For the AD use case it’s pretty important that you be able to target the right object if you are going to be deleting it from AD. If you are beginning with a VM, you’ll need to know how to find that VM in different systems. On a grander scale, being able to talk about the same thing between several systems is critical.
Picture credit to this guy.