Check if servers in a text list exist as VMware VMs

I got handed a list of around 1000 servers today, and asked if any of them were part of our VI environment.

Rather than work through it by hand, I wrote the following script:

If your VM object names do not match the DNS names on the list, then this won’t work, but I suppose you could combine this with some logic from the script I wrote to find mismatches.