So I was just asked this question last week and am searching for an answer. I came across this thread Remove objects from AD when a VM is deleted from vCenter with vCO which works great for me for my vRA environment, but what about machines that aren't built by vRA or are built by a set of scripts that clone VM's from templates, give the VM's specific names, join them to a certain domain, etc. Is there a custom attribute that can be put on a template so when the VM is deleted it's removed from AD? I'd prefer this to be automated. I understand I could use PowerShell to use the Remove-ADComputer command, but that seems to need a text file or something and I want it to happen when the machine is being deleted from vCenter, not after the fact where someone could forget to run the script.
So is it possible? I'm testing this on vCenter 6.5, but the environment in question would be vCenter 6.7.
Thanks in advance.