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 all modern Microsoft operating systems. 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
indicates progress at the command line by a series of dots, one for each computer as it is
documented. The user can abort the program by pressing Ctrl-C.
The name and path of the spreadsheet are passed to the program as an argument. WMI and
Microsoft Excel 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.