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.
- Server name
- OS version
- Last Service Pack # applied (not patch version)
- MAC Address, IP and DNS configuration for each active NIC