Category filter
Script to check Windows hotfixes installed on the device
A hotfix is a software update designed to remove bugs, improve security vulnerabilities and resolve the functionality issues of a computer program. Keeping hotfixes up-to-date on your device improves its performance and reduce security risks. Admins can check for Windows hotfixes installed on their devices and verify them using scripts. With Hexnode UEM, you can remotely deploy custom scripts to your enrolled Windows devices using the Execute Custom Script action.
PowerShell script
Check for specific hotfixes
You can check if a specific hotfix is present on the device, the below script will return the details.
1 |
Get-hotfix -id 'HotFixID' |
E.g., To get information of a hotfix having ID ‘KB5020872’, Get-hotfix –id KB5020872
The output can be verified from the Action History tab of the device. If the patch is present on the device:
If the patch is not present on the device:
Get the most recently installed hotfix
The below script will check the most recently installed hotfix on the device.
1 |
(Get-HotFix | Sort-Object -Property InstalledOn)[-1] |