Subscribe

Get the Network Administrators tool pack

Subscribe to our newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them.

Click Here to get your free tools

Recent Posts

Search

Archives

Generate a report of installed drivers

by Steve Wiseman on October 26, 2007 · 0 comments

in Windows


.

I came across this built-in command that works under XP, 2003, and Vista.

From the command line you can type:

driverquery

And it will immediately come back with a complete list of drivers

Driver List

Better yet, the program is loaded with options. If we look at the help screen for it:

Parameter List:
/S system Specifies the remote system to connect to.

/U [domain\]user Specifies the user context
under which the command should execute.

/P [password] Specify the Password for the given
user context. Prompts for input if omitted.

/FO format Specifies the type of output to display.
Valid values to be passed with the
switch are “TABLE”, “LIST”, “CSV”.

/NH Specifies that the “Column Header”
should not be displayed in the
screen output. Valid for “TABLE”
and “CSV” format only.

/V Displays detailed information. Not valid
for signed drivers.

/SI Provides information about signed drivers.

/? Displays this Help/Usage.

We can see that it is possible to query a computer remotely. I was going to build a simple program to do this for me…but is already built in!

My purpose was that I wanted to create a report of drivers on computers across my network. To accomplish this, it required two batch files.

I first created a batch file that looks like this:

@echo ===========================================
@echo Driver Report for Computer: %1
@echo ===========================================
@driverquery /s %1 /u intelliadmin\administrator /p [Password Removed]
@echo

Lets save that as DriverReport.bat

The script will run a driver query against a remote computer with the specified username and password…and will output to the command line a nicely formatted report. The computer name will be provided as the first command line parameter (That is what %1 is for)

Also – if you notice – you will need to put your password as cleartext in this batch file…so make sure you delete it when done.

Now, we need to create another batch file that will actually generate the report. Here is my first crack at it:


@del Report.txt
@DriverReport.bat Computer1 >> Report.txt
@DriverReport.bat Computer2 >> Report.txt
@DriverReport.bat Computer3 >> Report.txt
@DriverReport.bat Computer4 >> Report.txt
@DriverReport.bat Computer5 >> Report.txt
@DriverReport.bat Computer6 >> Report.txt

It deletes any report we created before, and then generates a report for each system…then takes the output and appends it to Report.txt

Simply fill out the batch file with your computer names. You could probably throw together a vb script that would populate it for you.

Lets save that last script as GenerateReport.bat

Now when you call it (GenerateReport.bat), Report.txt will contain a complete driver list for the computers you include.

Just make sure you put both batch files in the same folder – and be careful with your admin password. Don’t leave it laying around on your network in that first batch file.

One more thing…Subscribe to my newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them. Click Here to get your free tools

Related Articles:

Leave a Comment

Category Links - Windows Forum - Exchange Forum