- 1 year ago
Detection script for windows hotfixes
To detect installed Windows hotfixes on your system, you can use PowerShell. Here's a PowerShell script that will list all installed hotfixes:
powershellGet-HotFix | Select-Object HotFixID, Description, InstalledOn
Save the script in a .ps1 file, for example, detect_hotfixes.ps1
. Then, open a PowerShell window, navigate to the directory containing the script, and run it:
powershell.\detect_hotfixes.ps1
This script will display a list of installed hotfixes on your Windows system, including the HotFixID, Description, and the date the hotfix was installed.
Please note that the script requires administrative privileges to access certain system information. Therefore, make sure to run the PowerShell window as an administrator before executing the script.
If you only want to check for a specific hotfix, you can filter the results using the Where-Object
cmdlet. For example, to check if a hotfix with the HotFixID "KB123456" is installed, you can modify the script as follows:
powershell$hotfixID = "KB123456"
Get-HotFix | Where-Object { $_.HotFixID -eq $hotfixID } | Select-Object HotFixID, Description, InstalledOn
Replace "KB123456" with the HotFixID you want to check for.
Keep in mind that this script will only detect hotfixes installed using the Windows Update service or other official channels. It may not detect hotfixes installed manually or through third-party software.