Server Inventory Script

I have been working on a number of projects lately where I need to touch most of the servers in our environment; be it changing DNS servers, or querying event logs, I needed a way to get every live server out there.

The attached script will query AD for all servers, then if pingable, it will attempt to gather more info via WMI. The final result is output to a CSV file in the C:\ root of the local computer.

On servers not running WMI, it will attempt to do a DOS Ping and then run NBTStat to gather the IP and MAC address.