Home » PowerShell » PowerShell Commands to Check Installed Patches in Windows

PowerShell Commands to Check Installed Patches in Windows

There are two PowerShell commands that you can use to check installed patches in the Windows operating system.

  • Get-HoxFix – This PowerShell command uses Win32_QuickFixEngineering WMI class to list hotfixes that are installed on local computers or remote computers.
Get-HotFix [-ComputerName <string>] [-Filter <string>]
  • wmic qfe list – This command uses the WMI ( Windows Management Instrumentation) to retrieve the list of all hotfixes that are installed on the local computer.
wmic qfe list

In this article, we will discuss how to use PowerShell commands to check the installed patches on the Windows system.

Using PowerShell Command Get-HoxFix to Check the Installed Patches

Use the Get-HotFix cmdlet in PowerShell to retrieve the list of all installed hotfixes in the Windows system.

Get-HotFix

The above PowerShell command Get-Hotfix checks for the installed patches and returns the list of hotfixes.

The output of the above PowerShell script to retrieve the list of all installed patches is given below.

Get-HotFix - Check all installed hotfixes in the system
Get-HotFix – Check all installed hotfixes in the system

The Get-HotFix cmdlet in PowerShell can be used to retrieve the list of hotfixes on local and remote computers. It has -ComputerName parameter to specify the computer name for which you want to retrieve the installed hotfixes.

Get-HotFix -ComputerName "INCORP-EU-DB01"

In the above PowerShell script, the Get-HotFix command uses the -ComputerName parameter to specify the remote computer and returns the list of all installed patches on the system.

Cool Tip: How to check installed software in Windows using PowerShell!

Using the wmic qfe list Command to Check Installed Software Updates (Patches)

You can use the wmic qfe list command to check installed software updates (patches) on the system.

wmic qfe list

The output of the above PowerShell command wmic qfe list returns the list of software patches installed on the system.

Cool Tip: How to get the last patch date using PowerShell!

Conclusion

I hope the above article on how to check installed patches on the system using PowerShell commands such as Get-HotFix and wmic qfe list is helpful to you.

You can find more topics about PowerShell Active Directory commands and PowerShell basics on the ShellGeek home page.