WMI Inventory Script

This script is a bit of a doozy, over 900 lines, so I am not posting it here, but it is available in my scripts download location.  It also writes data to a database so I hav included to SQL scripts to create the necessary database.  I am trying to throw together a simple .NET based website to query the information and once I have that done I’ll post it as well.
They key to this script is WMI, WMI, and more WMI.  By using some common WMI classes, like WIN32_Processor and WIN32_LogicalDisk we can put together a fairly healthy inventory of our server environment.  Another concern when writing the script was determining SQL Server installations.  By using the \root\Microsoft\SQLServer\ComputerManagement namespace I was able to uncover some useful classes that gave me information about installed instances and their network configuration.  I ran into a snag here (it wouldn’t be fun without a snag!) because while SQL Server 2000 comes with a WMI provider, it is not installed by default. Until I can resolve this issue I created an alternat method that provides somethat less information, but still gives us the version and build number.
Please take a look at the script downloads and get server_inventory.vbs from the VBScript section and Create Inventory Database.sql and Create Inventory Tables.sql from the SQL section.  Run Create Inventory Database.sql first, then run Create Inventory Tables.sql.
Feel free to email me with comments, suggestions, and improvements for any script!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s