Video Transcript

Hi, this is Jeff Hicks. Today I want to give you a quick demonstration of a Windows 7 command line tool that you can use to gather information about system drivers locally and remotely. I have a command prompt open here and the tool we are going to use is called driverquery.exe. I am going to run here driverquery /? to see the syntax on how to use it.

As you can see, not to difficult. I can specify a remote computer name with /S, also specify some credentials and I can control the formatting. Here is what this looks like. I am going to run driverquery | more. Just because the results will come through pretty quickly I am going to pipe it to more and there you can see the results. This is on my local Windows 7 Desktop. You can see the drivers that are loaded, what type of driver, and the link date is kind of the version date of the appropriate driver. I am just going push Q to quit out of that.

Let's look at this another way, let's do driverquery /v /fo list |more, there is a /v for verbose. I am also going to format this as a list and again I am going to pipe this to more so I can control the paging of the output. Now I get even more detailed information about each of the drivers. You can see for example the FireWire controller there at 1394, I believe that is FireWire. You can see all sorts of good information about that. I could pipe that to a text file if I wanted to, or I might try something like this.

Let's do driverquery /s chi-fp01 /v /fo csv > fp01-drivers.csv.' This time let's connect to another computer. I'll have them connect to a file and printer server in the Chicago office here. We'll do the /v. I'm going to format this time though as a csv format and I want to save this as a file so I'm going to use the console redirection character and this to a file called fp01-drivers.csv. So, this is connecting to the remote computer, query using primarily WMI, get some information, and create that file.

Let's open this file real quickly in Excel. Alright, so there is the file. That same information that we saw as a list is now in a csv file. I can open this in Excel, I could sort format, filter, do whatever I would like with this information. Quite useful. Let's close that, we do not need to save that for right now.

If you wanted to do this for say a bunch of computers. It's kind of like scripting, but not completely. I have a text file called computers.txt in this directory and I am going to use the for command with /f, specify variable %i in computers.txt, and what I want to do is, I am going to do the driverquery command' /s for the computer name, we'll do /verbose, formatted as a list, and we are going to save each one to a file with the computer name -driverdata.txt' (for /f %i in (compters.txt) do @driverquery /s %i /v /fo list > %i-driverdata.txt).' I have three computers on that list, it is going out and connecting to them and you can see one of the results here. Let's look at the one for one of the domain controllers. Alright, so there is that information and with really very little effort I have gone out and have documented and have queried to see what the devise driver configuration is on multiple computers in my environment.

Now, there are certainly much easier ways to do this. For example using Windows PowerShell and WMI and there are some other tools that you can use. Check out the accompanying article and you will see how to do just that. Thanks you very much for your time today.