As a consultant, many times I need to quickly gain information about the Windows servers in an environment. I’ve finally put something together to try and make my life easier. It is a script that opens Microsoft Excel, sets column definitions that seem useful to me, then populates the spreadsheet with a bunch of data. The data is gathered from every Windows server that is a member of the Active Directory domain you specify. Specifically, it gathers:
- Server Name
- Whether the server is online (ping’able) or not
- OS
- Service Pack
- Manufacturer
- Model
- Serial Number
- Whether it is a domain controller
- Whether it is a DNS server
- Whether it is a DHCP server
- Whether it is a WINS server (yes there are still a few of those)
- Whether it is a MSCS cluster node
- Whether it is an Exchange server
- What applications are installed (excluding Security Updates and Hotfixes)
- Whether WMI could be connected to
Dependencies
- Microsoft Excel (any later version is fine)
- Sysinternals PSTools
- Admin rights on every server in the domain (Domain Admin rights would be easiest)
I wanted to use WMI exclusively but unfortunately it is very unreliable, therefore the script heavily depends on 2 PSTools (PSInfo and PSService). You will need to download those and place them in a directory on the PC you run the script from.
Edits
The only lines you need to edit are 15 and 16, where you enter in your domain name (follow the format example!) and the path to your PSTools directory.
'your domain below strDom = "DC=ACME,DC=COM" pstoolsPath = "c:\Tools\pstools"
You can download the text of the script here or a zip file with the script here. I hope others find it helpful. As always, use this solution at your own risk. If you have problems with the script, comment on the post and I will help when I have time.
