I've deployed BGInfo from SysInternals to all of our servers, both physical and virtual. However, a few of our servers have multiple hostnames to support "backward compatibility" with some of our legacy software systems after a server was replaced or its functions were merged with another server. In some cases, this may include several "alternate" hostnames that go back several years.
EXAMPLE:
Alternate Hostname (original computer): NT-PROD
Alternate Hostname (files/services merged from a retired server): NT-DATA
Alternate Hostname (hardware failure = new computer): PRODUCTION-07
Current Computer Name (physical server migrated to virtual): PRODUCTION-21
Using the basic WMIC
to get the computer name just returns the current name specified in the System Properties, while doing an NSLOOKUP
on the server's IP address apparently does the same thing. Is there a way I can actively retrieve all the DNS hostnames to which this specific server will respond for inclusion in my BGInfo wallpaper?
I suppose I could create a text file (or something) that BGInfo could check for alternate hostnames, but I'm trying to make this as "idiot-proof" as possible so I don't forget to update/apply any future DNS changes, or accidentally overwrite something with incorrect information. I readily admit that I'm not "fluent" in PowerShell scripts or more complex WMIC queries, but I would guess that's where we're headed.