Below is a PowerShell code that uses the Get-WMIObject cmdlet and Win32_NetworkAdapter WMI class to check driver version, Description, Manufacturer, driver date, and signer or the publisher of the driver.
Win32_NetworkAdapter WMI class is used to get the information about the Network Adapters available or installed on a server or computer.
To dig more about, Win32_NetworkAdapter WMI class check this link:
PowerShell cmdlets are commented on how the script works to get the data about the Network Adapter.
The gwmi or Get-WMIObject by default its output has a lot of trailing spaces.
PowerShell has trim and replace functionality to get rid of the trailing spaces.
Copy and paste the code below, and use PowerShell ISE to do a test run.
= = = = = = = = = = = = = = = = = = = = =
#Server - change to the server name or computer name where the information will be taken
# "." will indicate the current Computer where the script is running
#Server="Computer_Name"
$Server= "."
#Change the location and filename to any desired output
$xFile = "d:\myDriverList.txt"
#Trim the output of gwmi
#gwmi - is shortcut alias for Get-WmiObject
$NetworkAdapters = (gwmi -computer $Server win32_networkadapter | select name | Out-String).Trimend()
#uncomment command below if want need to see the output of $NetworkAdapters
#write $NetworkAdapters
$xNetAdapters = $NetworkAdapters.ToString().TrimEnd()
#write $xNetAdapter
#replace the spaces with nothing
#note the .replace( )is a double space
#if it is set to single space it will remove all the spaces on the string
$xNetAdapters = $xNetAdapters.ToString()
$xNetAdapters = $xNetAdapters.replace(" ","") | Set-Content $xFile
#write-host $xNetAdapters
#skip the first 3 lines on the file which is not needed
$xcontent = Get-Content $xfile | Select-Object -Skip 3
ForEach ($Line In $xcontent)
{
#write $Line
#List the driver description,Manufacturer, driverdate, driver version and the signer or publisher
$NetWorkDrivers = Get-WmiObject win32_pnpsigneddriver | WHERE { $_.Description -like "*$Line*" } | select Description , Manufacturer, driverdate, driverversion, signer
write $NetWorkDrivers
}
# "." will indicate the current Computer where the script is running
#Server="Computer_Name"
$Server= "."
#Change the location and filename to any desired output
$xFile = "d:\myDriverList.txt"
#Trim the output of gwmi
#gwmi - is shortcut alias for Get-WmiObject
$NetworkAdapters = (gwmi -computer $Server win32_networkadapter | select name | Out-String).Trimend()
#uncomment command below if want need to see the output of $NetworkAdapters
#write $NetworkAdapters
$xNetAdapters = $NetworkAdapters.ToString().TrimEnd()
#write $xNetAdapter
#replace the spaces with nothing
#note the .replace( )is a double space
#if it is set to single space it will remove all the spaces on the string
$xNetAdapters = $xNetAdapters.ToString()
$xNetAdapters = $xNetAdapters.replace(" ","") | Set-Content $xFile
#write-host $xNetAdapters
#skip the first 3 lines on the file which is not needed
$xcontent = Get-Content $xfile | Select-Object -Skip 3
ForEach ($Line In $xcontent)
{
#write $Line
#List the driver description,Manufacturer, driverdate, driver version and the signer or publisher
$NetWorkDrivers = Get-WmiObject win32_pnpsigneddriver | WHERE { $_.Description -like "*$Line*" } | select Description , Manufacturer, driverdate, driverversion, signer
write $NetWorkDrivers
}
= = = = = = = = = = = = = = = = = = = = =
Check network adapters for error:
http://quickbytesstuff.blogspot.sg/2015/10/powershell-check-network-adapters-error.html
Sample Output:
Description : WAN Miniport (IKEv2)
Manufacturer : Microsoft
driverdate : 20060621000000.******+***
driverversion : 6.2.9200.16384
signer : Microsoft Windows
Description : Microsoft Kernel Debug Network Adapter
Manufacturer : Microsoft
driverdate : 20060621000000.******+***
driverversion : 6.2.9200.16384
signer : Microsoft Windows
Description : Intel(R) I350 Gigabit Network Connection
Manufacturer : Intel Corporation
driverdate : 20120229000000.******+***
driverversion : 12.0.150.0
signer : Microsoft Windows
Description : Microsoft ISATAP Adapter
Manufacturer : Microsoft
driverdate : 20060621000000.******+***
driverversion : 6.2.9200.16384
signer : Microsoft Windows
Description : Hyper-V Virtual Ethernet Adapter
Manufacturer : Microsoft
driverdate : 20060621000000.******+***
driverversion : 6.2.9200.16384
signer : Microsoft Windows
Description : Microsoft Network Adapter Multiplexor Default Miniport
Manufacturer : Microsoft
driverdate : 20060621000000.******+***
driverversion : 6.2.9200.16384
signer : Microsoft Windows
Description : Microsoft Network Adapter Multiplexor Driver
Manufacturer : Microsoft
driverdate : 20060621000000.******+***
driverversion : 6.2.9200.16384
signer : Microsoft Windows
Description : Virtual Machine Network Services Driver
Manufacturer : Microsoft
driverdate : 20080116000000.******+***
driverversion : 2.6.623.0
signer : Microsoft Windows Hardware Compatibility Publisher
Description : VirtualBox Bridged Networking Driver Miniport
Manufacturer : Oracle Corporation
driverdate : 20121219000000.******+***
driverversion : 4.2.6.0
signer :
Description : Intel(R) 82579LM Gigabit Network Connection
Manufacturer : Intel
driverdate : 20121008000000.******+***
driverversion : 12.2.45.0
signer : Microsoft Windows Hardware Compatibility Publisher
Description : WAN Miniport (IP)
Manufacturer : Microsoft
driverdate : 20060621000000.******+***
driverversion : 6.1.7601.17514
signer : Microsoft Windows
Description : RAS Async Adapter
Manufacturer : Microsoft
driverdate : 20060621000000.******+***
driverversion : 6.1.7601.17514
signer : Microsoft Windows
Manufacturer : Microsoft
driverdate : 20060621000000.******+***
driverversion : 6.2.9200.16384
signer : Microsoft Windows
Description : Microsoft Kernel Debug Network Adapter
Manufacturer : Microsoft
driverdate : 20060621000000.******+***
driverversion : 6.2.9200.16384
signer : Microsoft Windows
Description : Intel(R) I350 Gigabit Network Connection
Manufacturer : Intel Corporation
driverdate : 20120229000000.******+***
driverversion : 12.0.150.0
signer : Microsoft Windows
Description : Microsoft ISATAP Adapter
Manufacturer : Microsoft
driverdate : 20060621000000.******+***
driverversion : 6.2.9200.16384
signer : Microsoft Windows
Description : Hyper-V Virtual Ethernet Adapter
Manufacturer : Microsoft
driverdate : 20060621000000.******+***
driverversion : 6.2.9200.16384
signer : Microsoft Windows
Description : Microsoft Network Adapter Multiplexor Default Miniport
Manufacturer : Microsoft
driverdate : 20060621000000.******+***
driverversion : 6.2.9200.16384
signer : Microsoft Windows
Description : Microsoft Network Adapter Multiplexor Driver
Manufacturer : Microsoft
driverdate : 20060621000000.******+***
driverversion : 6.2.9200.16384
signer : Microsoft Windows
Description : Virtual Machine Network Services Driver
Manufacturer : Microsoft
driverdate : 20080116000000.******+***
driverversion : 2.6.623.0
signer : Microsoft Windows Hardware Compatibility Publisher
Description : VirtualBox Bridged Networking Driver Miniport
Manufacturer : Oracle Corporation
driverdate : 20121219000000.******+***
driverversion : 4.2.6.0
signer :
Description : Intel(R) 82579LM Gigabit Network Connection
Manufacturer : Intel
driverdate : 20121008000000.******+***
driverversion : 12.2.45.0
signer : Microsoft Windows Hardware Compatibility Publisher
Description : WAN Miniport (IP)
Manufacturer : Microsoft
driverdate : 20060621000000.******+***
driverversion : 6.1.7601.17514
signer : Microsoft Windows
Description : RAS Async Adapter
Manufacturer : Microsoft
driverdate : 20060621000000.******+***
driverversion : 6.1.7601.17514
signer : Microsoft Windows
Cheers!! Hope it helps.
----------------------------------
Free Android app, download at Google play:
Linux Android App cheat sheet:
https://play.google.com/store/apps/details?id=com.LinuxMobileKit
Android Divine Mercy Chaplet Guide
https://play.google.com/store/apps/details?id=com.dmercyapp
Free Android app, download at Google play:
Linux Android App cheat sheet:
https://play.google.com/store/apps/details?id=com.LinuxMobileKit
Android Divine Mercy Chaplet Guide
https://play.google.com/store/apps/details?id=com.dmercyapp
Comments
Post a Comment