Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


April 11, 2005

Updating System Inventory Databases

RSS
View this exclusive article with VIP access -- click here to join |
See More Systems Administration Articles Here | Reprints | Or sign up for our VIP Monthly Pass!

Download the Code Here

[Editor's Note: Share your scripting discoveries, comments, problems, solutions, and experiences with products. Email your contributions (500 words or less) to r2rwinscriptsol@windowsitpro.com. We edit submissions for style, grammar, and length. If we print your submission, you'll get $100.]

My company has a large system inventory database that often needs updating and correcting. Manually checking more than 75 servers is tedious, so I wrote the SystemInventory.vbs script to obtain system information about servers in our environment. Listing 1 shows an excerpt from SystemInventory.vbs. You can download the full script from the Windows Scripting Solutions Web site. (Go to http://www.windowsitpro.com/windowsscripting, enter 45824 in the InstantDoc ID text box, then click the 45824.zip hotlink.)

As Listing 1 shows, SystemInventory.vbs uses Windows Management Instrumentation (WMI) to report on more than 400 system objects from 11 Windows classes: BIOS, BootConfiguration, ComputerSystem, ComputerSystemProduct, DiskDrive, DiskPartition, DisplayConfiguration, NetworkAdapter, NetworkAdapterConfiguration, OperatingSystem, and Processor. The script creates a Microsoft Excel worksheet that contains important information from each of these classes. SystemInventory.vbs saves the Excel spreadsheet that it creates to C:\~COMPUTERNAME.xls, where COMPUTERNAME is the name of the computer you're querying. The script requires Excel on the computer from which you run the script and WMI on the system you're checking. (Windows 2000 and later includes WMI.)

SystemInventory.vbs uses a simple Web input form that accepts the server's name, user credentials (i.e., Domain\UserID), and a masked password. Listing 2 shows the code for this form. You can use the IP address instead of the server name if name resolution is unavailable. If you need to authenticate to another domain or need to use different credentials, enter the domain name, a backslash, and the user ID and associated password. Otherwise, just enter the server name or IP address and click OK. If you leave the server name blank, SystemInventory.vbs queries the local machine.

You need Administrator rights to run SystemInventory.vbs. In addition, SystemInventory.vbs and SystemInventory.htm need to reside in the same folder. To stop SystemInventory.vbs from running, click the X on the Web input form's title bar to close the form. SystemInventory.vbs includes minimal error-checking code; if the computer that you're querying doesn't exist or doesn't have WMI installed, the script ends.

End of Article



Reader Comments
script appears corrupt.

usendo April 19, 2005 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

SET Options and Recompilation

Learn how to tweak your server's SET options so that you don't have to constantly recompile. ...


Related Articles Script Inventories Remote Computers and Writes the Information to a Database

System Inventory Mini-App

Task Automation Whitepapers Essential Guide to E-discovery and Recovery for Microsoft Exchange

Continuous Data Protection and Recovery for Microsoft Exchange

Protecting (You and) Your Data with Exchange Server 2007

Related Events SQL Server 2008 – Can You Wait? | Philadelphia

SQL Server 2008 – Can You Wait? | Atlanta

SQL Server 2008 – Can You Wait? | Chicago

Check out our list of Free Email Newsletters!

Task Automation eBooks Spam Fighting and Email Security for the 21st Century

A Guide to Windows Certification and Public Keys

Keeping Your Business Safe from Attack: Patch Management

Related Task Automation Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing