Author: Ghostwheel Version: 2.0.0 Created: 2026-01-19
Windows Update Manager v2 is a professional, production-ready PowerShell script that provides comprehensive Windows Update management through an intuitive menu-driven interface. This enhanced version includes automatic dependency management, system safety features, and advanced configuration options.
- ✅ Auto-detection of PowerShell version with upgrade recommendations
- ✅ Auto-installation of NuGet provider when needed
- ✅ Auto-installation of PSWindowsUpdate module
- ✅ PowerShell 7.5+ installation offering with clear benefits explanation
- ✅ Intelligent fallback to Windows PowerShell 5.1 if user declines upgrade
- 🎨 Color-coded messages (Info: Cyan, Success: Green, Warning: Yellow, Error: Red)
- 📊 Status indicators (✓ Success, ✗ Error, ⚠ Warning, ℹ Info)
- 📈 Progress tracking for long operations
- 🖥️ Professional banner and menu system
- 👁️ Visual elevation indicator (shows when running as Administrator)
- 🛡️ Pre-flight system checks (internet connectivity, disk space, service status)
- 💾 Automatic restore point creation before updates (configurable)
- 📝 Comprehensive error logging with timestamps
- 🔄 Automatic self-elevation to Administrator when needed
⚠️ Confirmation prompts for destructive operations
- 🔍 Smart update scanning with category filtering
- 📦 Install all or selected updates
- 🚫 KB exclusion list (persistent hide list)
- 👁️ Hide/unhide updates by selection or KB number
- ❌ Uninstall updates by KB number
- 📜 Update history viewing and export
- 🌐 Remote update management via Invoke-WUJob
- ⚙️ Persistent JSON configuration with validation
- 🎛️ First-run wizard for initial setup
- 📊 Compliance report generation
- 📁 Export to CSV for scan results and history
- 🔧 Flexible logging with transcript support
- Windows 10/11 or Windows Server 2016+
- Windows PowerShell 5.1 or PowerShell 7.x
- Administrator privileges (script will auto-elevate)
- Internet connectivity for updates
- PowerShell 7.5 or later (script will offer to install)
- 10GB+ free disk space
- Active Windows Update service
- NuGet package provider (2.8.5.201+)
- PSWindowsUpdate module (latest version)
-
Right-click the script and select "Run with PowerShell"
- Or open PowerShell and run:
.\WindowsUpdate-Manager_v2.ps1
- Or open PowerShell and run:
-
The script will:
- Check for Administrator privileges and elevate automatically
- Check dependencies and install if missing
- Offer PowerShell 7.5+ installation (optional)
- Run the first-run configuration wizard
-
Follow the on-screen prompts to configure your preferences
On first run, you'll be asked to configure:
-
Update Source
- Microsoft Update (includes Windows + Microsoft products) - Recommended
- Windows Update only
-
Auto Reboot
- Whether to automatically reboot after updates if required
-
Create Restore Point
- Whether to create system restore points before installing updates (Recommended)
[1] Status
- View installer status, reboot requirements, last results, and service managers
- Quick health check of Windows Update system
[2] Scan for Updates
- Scan for available updates with optional filters
- Shows summary by severity (Critical, Important, Moderate, Low)
- Export scan results to CSV
[3] Install ALL Updates
- Install all available updates automatically
- Creates restore point before installation
- Includes pre-flight system checks
[4] Install SELECTED Updates
- Choose specific updates from last scan
- Select multiple updates using Out-GridView or console selection
- Checks against KB exclusion list
[5] Hide SELECTED Updates
- Hide unwanted updates
- Automatically adds to KB exclusion list
- Prevents updates from appearing in future scans
[6] Unhide by KB
- Unhide previously hidden updates
- Removes from KB exclusion list
[7] Uninstall by KB
- Uninstall specific updates by KB number
- Creates restore point before uninstallation
- Use with caution
[8] Show Update History
- View update installation history
- Filter by number of entries
- Export history to CSV
[9] Reset Windows Update Components
- Resets Windows Update services and cache
- Use when experiencing persistent update problems
- Creates restore point before reset
- May require reboot
[10] Update PSWindowsUpdate Module
- Check for and install latest version of PSWindowsUpdate
- Ensures you have the latest features and fixes
[11] Target Computers
- Configure remote computers for update management
- Supports comma-separated list of computer names
- Leave blank for local computer only
[12] Settings
- Toggle update source (Windows Update / Microsoft Update)
- Toggle auto reboot
- Toggle ignore reboot
- Toggle verbose output
- Toggle system restore point creation
- Toggle logging (transcript)
- Manage KB exclusion list
[13] Remote Install Job
- Create SYSTEM-level scheduled task on remote computers
- Reliable remote update installation
- Requires PowerShell remoting enabled
[14] Generate Compliance Report
- Generate detailed compliance report
- Includes system info, update status, and available updates
- Exports to text file
The script uses colors to make information easier to understand:
- Cyan (ℹ) - Informational messages
- Green (✓) - Success messages
- Yellow (⚠) - Warning messages
- Red (✗) - Error messages
- Gray - Secondary information
Before major operations, the script performs automatic checks:
- Internet Connectivity - Tests connection to update servers
- Disk Space - Ensures sufficient free space (10GB+ recommended)
- Windows Update Service - Verifies service is running
- PowerShell Version - Shows version information (detailed mode)
Failed checks will prompt you to decide whether to continue.
The script stores configuration in JSON format at:
%APPDATA%\WindowsUpdateManager\config.json
{
"UseMicrosoftUpdate": true,
"AutoReboot": false,
"IgnoreReboot": false,
"Verbose": false,
"TargetComputers": [],
"CreateRestorePoint": true,
"ExcludedKBs": [],
"AutoAcceptEULA": false
}- UseMicrosoftUpdate: Use Microsoft Update (true) or Windows Update only (false)
- AutoReboot: Automatically reboot after updates if required
- IgnoreReboot: Install updates even if reboot is pending
- Verbose: Show detailed output from PSWindowsUpdate cmdlets
- TargetComputers: Array of remote computer names (empty = local)
- CreateRestorePoint: Create system restore point before updates
- ExcludedKBs: Array of KB numbers to exclude (hidden updates)
- AutoAcceptEULA: Automatically accept EULAs (use with caution)
Enable via Settings menu ([12] → [6])
Logs stored in:
%APPDATA%\WindowsUpdateManager\logs\Transcript_YYYYMMDD_HHMMSS.log
Automatic error logging to:
%APPDATA%\WindowsUpdateManager\logs\ErrorLog_YYYYMMDD_HHMMSS.txt
Logs all errors with timestamps and exception details.
.\WindowsUpdate-Manager_v2.ps1 [parameters]-NoElevation
- Prevents automatic elevation to Administrator
- Use only if already running elevated
-ConfigPath
- Custom configuration file path
- Default:
%APPDATA%\WindowsUpdateManager\config.json
-LogPath
- Custom transcript log path
- Default: Auto-generated in logs folder
-SkipDependencyCheck
- Skips automatic dependency checking and installation
- Use only if dependencies are confirmed installed
-Silent
- Minimizes user prompts for automated operation
- Use with caution
# Run with default settings
.\WindowsUpdate-Manager_v2.ps1
# Run without elevation (already admin)
.\WindowsUpdate-Manager_v2.ps1 -NoElevation
# Custom config and log paths
.\WindowsUpdate-Manager_v2.ps1 -ConfigPath "C:\Config\wu.json" -LogPath "C:\Logs\wu.log"
# Skip dependency checks (faster startup)
.\WindowsUpdate-Manager_v2.ps1 -SkipDependencyCheck- Run the script
- Follow the first-run wizard
- Let dependencies auto-install
- Consider upgrading to PowerShell 7.5+
- Select [2] Scan for updates
- Review the available updates
- Select [4] Install SELECTED updates
- Choose updates from the list
- Confirm installation
- Select [2] Scan for updates
- Select [5] Hide SELECTED updates
- Choose updates to hide
- Updates are hidden and added to exclusion list
- Select [11] Target computers
- Enter comma-separated computer names
- Select [13] Remote install job
- Specify targets and options
- Job runs as SYSTEM on remote computers
- Select [9] Reset Windows Update components
- Confirm the reset operation
- Restore point is created automatically
- Reboot if prompted
- Select [14] Generate compliance report
- Report is generated with system info and update status
- Open report for review or archival
- Required for most update operations
- Script auto-elevates when needed
- Visual indicator shows elevation status
- Created before major operations
- Provides rollback capability
- Can be disabled in settings if needed
- Persistent list of hidden updates
- Prevents unwanted updates from installing
- Manage via Settings → Manage KB Exclusion List
- Requires PowerShell remoting enabled
- Uses SYSTEM account for reliability
- Ensure appropriate network security
Solution:
- Ensure you're running as Administrator
- Check internet connectivity
- Verify NuGet provider is installed
- Try manual installation:
Install-PackageProvider -Name NuGet -Force Install-Module -Name PSWindowsUpdate -Force
Solution:
- Run pre-flight checks
- Check disk space (need 10GB+)
- Verify Windows Update service is running
- Try resetting Windows Update components ([9])
Solution:
- Right-click PowerShell → "Run as Administrator"
- Then run the script manually
- Or use
-NoElevationparameter
Solution:
- Verify PowerShell remoting is enabled:
Enable-PSRemoting -Force
- Check firewall rules
- Verify network connectivity
- Ensure PSWindowsUpdate is installed on targets
Solution:
- Limit history entries with a number (e.g., 50)
- Windows Update history can be very large
- Consider using smaller numbers for initial query
- Use PowerShell 7.5+ for best performance
- Enable verbose mode only when troubleshooting
- Limit history queries to recent entries
- Use local targeting for faster operations
- Schedule off-peak for large update installations
If you're upgrading from the original script:
- Automatic dependency management
- Enhanced color-coded UI
- Pre-flight system checks
- System restore point creation
- KB exclusion list
- Compliance reporting
- Improved error handling and logging
- First-run configuration wizard
- PowerShell 7.5+ installation option
- v2 will create a new config file
- Old settings can be manually re-entered via Settings menu
- No data loss - old config is not modified
- Run the script with
-Verboseparameter for detailed output - Check error logs in
%APPDATA%\WindowsUpdateManager\logs\ - Review transcript logs if logging is enabled
- Built-in help:
Get-Help .\WindowsUpdate-Manager_v2.ps1 -Full - PSWindowsUpdate docs: https://www.powershellgallery.com/packages/PSWindowsUpdate
This script is provided "as-is" without warranty of any kind. Use at your own risk.
- Always create restore points before major changes
- Test on non-production systems first
- Review updates before installing (use scan first)
- Keep exclusion list current and minimal
- Regular compliance reports for audit trails
- Schedule updates during maintenance windows
- Verify pre-flight checks before mass deployments
- Enable logging for troubleshooting and audits
- Run script (auto-elevates to Administrator)
- Complete first-run wizard
- Consider installing PowerShell 7.5+
- Verify dependencies are installed
- Configure settings to your preferences
- Run initial scan for updates
- Review and install updates as needed
- Set up KB exclusions if needed
- Enable logging for audit trail
- Generate compliance report
Enjoy professional Windows Update management with WindowsUpdate-Manager v2!
For questions or issues, please refer to the error logs or enable verbose mode for detailed diagnostics.