VBScript program to inventory all computers in the domain. The program uses ADO to retrieve the names
of all computer objects. Then the program connects to each computer with WMI to retrieve operating
system, service pack, and hot fix information. The information is documented in a Microsoft Excel
spreadsheet.
To avoid the timeout that would result if the program attempted to connect to a machine that is off
line, the program first pings each computer. Only if the computer responds is the connection attempted.
However, the connection attempt will still timeout if WMI is not installed on the remote computer. WMI
is built into Windows 2000, Windows XP, Windows Server 2003, and all newer
operating systems. WMI can also be
installed on any other Microsoft 32-bit client. The spreadsheet indicates which computers were off
line when the program ran, and which computers did not have WMI installed.
It can take awhile to retrieve information from every computer in a large network. The program uses
Internet Explorer to display an interactive message box indicating which computer is currently being
documented and how many computers have been documented. The user can abort the program by closing
this message box.
The name and path of the spreadsheet are passed to the program as an argument. WMI, Microsoft Excel,
and Internet Explorer must be installed on the computer where this program runs. Only computers that
are started and logged into the domain will be documented. However, it is not required that any users
be logged in on the remote machines.
The first version of this program documents each computer in a column of the spreadsheet. However,
Excel 2003 (and earlier) is limited to 256 columns in a spreadsheet, so this version can only
document 255 computers.
Inventory.txt <<-- Click here to view or download the program
The second version of this program reverses the rows and columns, so that each computer is in a row.
Because Excel 2003 (and earlier) can handle up to 65,536 rows, this version is limited to 65,535
computers:
Inventory2.txt <<-- Click here to view or download the program
Excel 2007 can handle up to 1,048,576 rows or up to 16,384 columns.