Get Driver Versions in PowerShell

Using win32_PnpSignedDriver class of the WMI object

To get driver versions in PowerShell, use win32_PnpSignedDriver class of the WMI object.

Get-WmiObject Win32_PnPSignedDriver| select Devicename, Driverversion, Description

After running the command, your PowerShell should give you an output something like this:
Get Driver version in PowerShell

Note how the columns are arranged as Device Name, Device Version, and Description. If you are to write the command in any sequence, the results will be the same but order will change. Here’s the output if you write it in a different order:

Get Driver versions in PowerShell -  Get-WmiObject

You can further customize the command for simplicity. For instance, remove the Description by using:

Get-WmiObject Win32_PnPSignedDriver| SELECT Devicename, Driverversion

OR

gwmi Win32_PnPSignedDriver| SELECT Devicename, Driverversion

What is Get-WmiObject?

WMI means "Windows Management Instrumentation". The Get-wmi cmdlet is used to retrieve information on available WMI classes as well as instances of WMI classes.

Using Get-CimInstance cmdlet

If you have PowerShell 6.0 or above you can also use the Get-CimInstance cmdlet instead of, Get-WmiObject.
Firstly, start by checking your PowerShell Version by using the following command:

$PSVersionTable

You can check your version details from the following output:
PSVersionTable output
If everything checks out, use the command:

Get-CimInstance win32_PnpSignedDriver

OR

gcim win32_PnpSignedDriver

Your PowerShell should show a similar output:
Get-CimInstance  Output
Remember that you can always filter out drivers against their versions by using SELECT.
For example:

gcim win32_PnpSignedDriver | SELECT Description, DriverVersion

gcim Output

Conclusion

PowerShell essentially serves as a task automation solution. Being made of scripting language, configuration management framework, and command-line shell, you can use PowerShell to check information regarding your device alongside executing other functions.In this article, we learned the two ways of how to get driver versions in PowerShell. These methods are Get-WmiObject (gwmi) and Get-CimInstance (gcim).

Both are followed by win32_PnpSignedDriver to retrieve information. You expand this command by using SELECT to retrieve description and driver version.
So, here’s a summary of commands:
[wpdatatable id=15]

That’s all about how to get driver versions in PowerShell.

[social_share share_on="facebook,twitter,linkedin,whatsapp"][post_navigator in_same_term="true"]

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe to our newletter

Get quality tutorials to your inbox. Subscribe now.