Auditing installed drivers

Version 1

    I found a Powershell script that can query drivers installed on your server which may come in handy when troubleshooting.

     

    Open Powershell and run the scripts below, it will output the result to d:\temp (you may want to change this).

     

    For 64 bit drivers:

     

    get-itemproperty -path hklm:\software\odbc\odbcinst.ini\"Odbc drivers" | get-member | where {$_.definition -match "installed"} | foreach-object { get-itemproperty -path $("hklm:\software\odbc\odbcinst.ini\"+ $_.name)} |select-object PSChildName,Driver|Add-member -MemberType ScriptProperty -Name FVersion -Value {(((get-item$this.Driver).versionInfo)).FileVersion} -PassThru |export-CSV d:\temp\64bit_drivers.csv -noTypeInformation

     

    For 32 bit drivers:

     

    get-itemproperty -path hklm:\software\wow6432Node\odbc\odbcinst.ini\"Odbc drivers" | get-member | where {$_.definition -match "installed"} | foreach-object { get-itemproperty -path $("hklm:\software\wow6432Node\odbc\odbcinst.ini\"+ $_.name)} | select-object PSChildName,Driver|Add-member -MemberType ScriptProperty -Name FVersion -Value {(((get-item $this.Driver).versionInfo)).FileVersion} -PassThru |export-CSV d:\temp\32bit_drivers.csv -noTypeInformation

     

    Cheers,

     

    John