💻 PowerShell Script to Check Microsoft Security Updates (KB) Across Multiple Computers
- Avijit Dutta
- Aug 14
- 2 min read
Published on: August 14, 2025
Author: Avijit Dutta
Category: PowerShell Scripting | Microsoft | IT Infrastructure Administration

🚀 Introduction - PowerShell Script to Check Microsoft Security Updates (KB) Across Multiple Computers
Keeping Windows systems up-to-date with the latest Microsoft Security Updates 🔒 is crucial for maintaining security and compliance ✅. Manually checking each system for a specific KB (Knowledge Base) update 📚 can be time-consuming — especially in large environments with multiple computers or servers 🖥️🖥️.
In this post, you’ll learn how to use a PowerShell Script to Check Microsoft Security Updates (KB) Across Multiple Computers⚡. We’ll read KB numbers 📄 and computer names 💻 from text files, check each system, and export a detailed report 📊 showing which updates are installed ✅ and which are missing ❌.
🛠️ Prerequisites
Before running the script, make sure you have:
🖥️ PowerShell 5.1 or later (Windows 10/11 & Server 2012+).
🔑 Administrative access to target computers.
🔄 Remote PowerShell execution enabled (Enable-PSRemoting).
📂 Two text files:
C:\security_update\securityupdate.txt → contains KB numbers (one per line).
C:\security_update\computers.txt → contains computer names (one per line).
📄 securityupdate.txt file should be look like
📄 computers.txt file should be look like
🔍 How the Script Works
📥 Reads KB numbers from securityupdate.txt.
📥 Reads computer names from computers.txt.
🛠️ Uses PowerShell’s Get-HotFix to check each machine for each KB.
✅ If found → logs Installed Date.
❌ If not found → marks "Not Installed".
📤 Exports results to a CSV report.
Flowchart Diagram showing the KB checking process

💾 The Complete PowerShell Script
📥 Download the Script
The full script named "Check-KBStatus.ps1" is included in the zip file "Check-KBStatus.zip". You can download it, unzip it, and use it.
📊 Sample Output
💻 ComputerName | 🔢 KBNumber | 📅 InstalledDate | 📌 Status |
PC-IT-01 | KB5028166 | 08-08-2025 | Installed ✅ |
PC-IT-01 | KB5030213 | Not Installed ❌ | |
PC-IT-02 | KB5028166 | 05-08-2025 | Installed ✅ |
PC-IT-02 | KB5030213 | Not Installed ❌ |
✅ Conclusion
By using this PowerShell automation ⚡, you can save hours ⏳ of manual work while ensuring all systems are patched 🔒.This script is scalable, efficient, and easy to maintain 🛠️ — a must-have for IT admins managing multiple machines 🖥️.
💡 Pro Tip: Schedule this script via Task Scheduler 📅 to run automatically and email you 📧 the results for seamless patch compliance tracking.
☕ Found this helpful? Share it & show some love!
Tip me a coffee at 👉 paypal.me/duttaavijit #ThankYou #SupportCreators
Your small support helps fuel more free, volunteer-driven content like this. Thank you! 🙏
Komentari