In a previous tip you discovered driverquery.exe to list driver information. This tool sports a /V switch for even more verbose information. However, due to localization errors, when you specify /V, column names may no longer be unique.
That's when you can reuse yet another tip we presented earlier and make sure CSV columns are unique:
function Show-DriverDialogVerbose {
param(
$ComputerName = $env:computername
)
function Convert-Unique($list) {
$list | Group-Object |
ForEach-Object {
$_.Group | ForEach-Object { $i=0 } { $i++
if ($i -gt 1) { $_ += $i } $_ }
}
}
driverquery.exe /V /S $ComputerName /FO CSV |
ForEach-Object {$i=0}{ $i++
if ($i -eq 1) {
"""$((Convert-Unique ($_.Replace('"','').Split(',') )) -join '","')"""
} $_
} |
ConvertFrom-Csv |
Out-GridView -Title "Driver on \\$ComputerName"
}
ReTweet this Tip!
Posted
Apr 10 2012, 06:00 AM
by
ps1