List All Files Associated With The Driver

Welcome Forums General PowerShell Q&A List All Files Associated With The Driver

This topic contains 4 replies, has 3 voices, and was last updated by

MoA
 
Participant
3 years, 9 months ago.

  • Author
    Posts
  • #26840
    MoA

    Participant
    Points: 0
    Rank: Member

    Is there a way to list all of the files with their path associated with the driver.

    For instance, Intel Graphics driver has many files associate with it. (Screen Shot of Device Manager listing all of the files of Intel Graphics driver.)

    The code I am using is:

    # 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
    

    It only lists one main .sys file.

    While researching, I found out that...

    get-wmiobject -class "Win32_PrinterDriver" -namespace "root\CIMV2" -computername $Server
    

    Win32_PrinterDriver class has extra set of properties like DataFile, ConfigFile, DependentFile and etc.

    However, it only lists printer drivers.
    Is there a way to list all of the driver or possibly a different class that would list other files as well?

  • #26884

    Participant
    Points: 639
    Helping Hand
    Rank: Major Contributor
  • #26926
    MoA

    Participant
    Points: 0
    Rank: Member

    Thank you, Rob. Yes, I looked into it, and it seems like it just outputs .sys file associated with the driver.
    I am trying to list all of the files associated with the driver (i.e. .inf, .dll and etc).

  • #26930

    Participant
    Points: 0
    Rank: Member

    There doesn't seem to be a WMI based way to get this

  • #26981
    MoA

    Participant
    Points: 0
    Rank: Member

    I was able to list all of the drivers using DevCon utility.

    devcon.exe driverfiles * > file.txt

The topic ‘List All Files Associated With The Driver’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort