windowspowershelldriversdevcon

List Driver related files and their versions


Is there any way or tutorials where I can:

  1. List all of the files related to the driver
  2. List File version of those file (.exe, .dll, .sys and etc.)

I am trying to compile a list of all of the drivers installed in the computer and mainly list all of the files related to the driver (exe, sys, dll and etc.) along with file version. Please see attached picture.

Link to picture:

I tried to use Wmi-Object (Powershell) and DevCon tool, but can get those files to be listed.

Using Powershell, I am able to list the driver name, but only file appears.

# Script to output all of the drivers installed in the computer

# Export all driver names to a text file
Get-WmiObject win32_SystemDriver | select name | foreach {$_.name} | Out-File C:\driverName.csv

# Read driver name from file.
$driver =  Get-Content "C:\driverName.csv"

# Get the file path of the driver
$path = (Get-WmiObject win32_SystemDriver | Where-Object name -match $driverName).PathName

# Extract information from the file path and export it to CSV
(Get-Item $path).VersionInfo  | Select FileDescription, ProductVersion, FileVersion, FileName | Export-Csv -Path C:\FileVersion.csv

Solution

  • User DevCon utility to list information about all of the drivers installed in the computer.

    1. Download DevCon package from here:
    2. Unzip the package
    3. Open CMD as Admin and change directory to unzipped folder
    4. Run devcon.exe driverfiles *
    5. It will list all of the driver installed in the computer, their hardware ids, .inf file, and all other file associated with that particular driver.