{"id":51215770,"url":"https://github.com/sysadmindoc/wurepair","last_synced_at":"2026-06-28T04:00:59.952Z","repository":{"id":351124432,"uuid":"1184953120","full_name":"SysAdminDoc/WURepair","owner":"SysAdminDoc","description":"Comprehensive Windows Update component repair - DLL re-registration, DISM, SFC, network reset","archived":false,"fork":false,"pushed_at":"2026-06-26T18:35:39.000Z","size":1111,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-26T20:16:34.833Z","etag":null,"topics":["networking","powershell","script","sysadmin","windows"],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SysAdminDoc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-18T04:58:53.000Z","updated_at":"2026-06-26T18:35:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/SysAdminDoc/WURepair","commit_stats":null,"previous_names":["sysadmindoc/wurepair"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/SysAdminDoc/WURepair","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SysAdminDoc%2FWURepair","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SysAdminDoc%2FWURepair/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SysAdminDoc%2FWURepair/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SysAdminDoc%2FWURepair/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SysAdminDoc","download_url":"https://codeload.github.com/SysAdminDoc/WURepair/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SysAdminDoc%2FWURepair/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34876271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["networking","powershell","script","sysadmin","windows"],"created_at":"2026-06-28T04:00:47.030Z","updated_at":"2026-06-28T04:00:59.941Z","avatar_url":"https://github.com/SysAdminDoc.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"icon.svg\" width=\"128\" height=\"128\" alt=\"WURepair\"\u003e\u003c/p\u003e\n\n# WURepair\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Platform-Windows%2010%2F11-blue?style=for-the-badge\u0026logo=windows\" alt=\"Platform\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Language-PowerShell-5391FE?style=for-the-badge\u0026logo=powershell\" alt=\"PowerShell\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Version-2.11.0-orange?style=for-the-badge\" alt=\"Version\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-MIT-green?style=for-the-badge\" alt=\"License\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eComprehensive Windows Update Repair Tool\u003c/b\u003e\u003cbr\u003e\n  \u003ci\u003eFix Windows Update when nothing else works\u003c/i\u003e\n\u003c/p\u003e\n\n---\n\n## Overview\n\n**WURepair** is a comprehensive repair tool that fixes Windows Update issues caused by privacy tools, malware, system corruption, or misconfiguration. It goes beyond basic troubleshooting by addressing root causes like hosts file blocks, disabled services, SSL/TLS misconfigurations, and blocking policies.\n\nIf you've run tools like [privacy.sexy](https://privacy.sexy), O\u0026O ShutUp10, or Windows debloaters and now Windows Update won't work, this tool can help restore functionality.\n\n## Features\n\n### 🌐 Network \u0026 Connectivity Repairs\n- **Hosts File Cleanup**: Removes blocks for 25+ Microsoft update domains\n- **SSL/TLS Repair**: Enables TLS 1.2, configures .NET for strong cryptography\n- **Firewall Rules**: Removes blocking rules, ensures update services are allowed\n- **Winsock/TCP Reset**: Full network stack reset\n- **Proxy Cleanup**: Clears proxy settings that may interfere\n\n### ⚙️ Service Repairs\n- **BITS Repair**: Fixes Background Intelligent Transfer Service dependencies and configuration\n- **Delivery Optimization**: Re-enables if disabled by privacy tools\n- **Service Dependencies**: Ensures RpcSs, EventSystem, SystemEventsBroker are running\n- **Correct Start Types**: Resets all update services to proper configurations\n- **WaaS / USO Repair**: Resets Update Orchestrator services and re-enables disabled USO scheduled tasks\n- **Delivery Optimization Reset**: Clears Delivery Optimization cache and removes stale download-mode policy values\n\n### 📋 Policy \u0026 Registry Repairs\n- **Removes Blocking Policies**: Clears 10+ registry values that disable Windows Update\n- **WSUS Detection**: Identifies misconfigured WSUS server redirections\n- **Registry Cleanup**: Removes stuck reboot flags and pending update markers\n- **Group Policy Refresh**: Forces policy update after changes\n\n### 🔧 System Repairs\n- **SoftwareDistribution Reset**: Backs up and clears update cache\n- **Catroot2 Reset**: Clears cryptographic catalog cache\n- **DLL Re-registration**: Re-registers 35+ Windows Update DLLs\n- **DISM Integration**: Repairs component store corruption\n- **Component Store Analysis**: Parses `DISM /AnalyzeComponentStore` and uses `/ResetBase` only when cleanup is recommended and reclaimable data is at least 1024 MB\n- **Servicing Stack Preflight**: Optional `-StageSSU` path downloads and installs an applicable Servicing Stack Update before DISM\n- **Catalog SSU Repair**: Optional `-RepairServicingStack` searches Microsoft Update Catalog, downloads the newest matching SSU `.msu`, and retries the next match if `wusa.exe` returns `0x800f0922`\n- **SFC Integration**: Scans and repairs system file integrity\n\n### 📊 Diagnostics \u0026 Verification\n- **Diagnostic Pre-Check Report**: Formatted status table showing service states, folder sizes, DISM health, pending reboot status, last successful update date, and last 5 Windows Update errors from event log\n- **Ranked HRESULT Summary**: Parses `%WINDIR%\\WindowsUpdate.log` and converted Windows Update ETW traces into the top 10 recurring error codes with Microsoft reference links\n- **WaaSMedic \u0026 Delivery Optimization Health**: Surfaces Windows Update Medic service state, recent medic warnings/errors, Delivery Optimization peer cache health, active jobs, peer counts, and transfer byte totals\n- **Update Health Tools Detection**: Detects Microsoft Update Health Tools / Windows Remediation presence, `uhssvc`, `sedsvc`, `sedlauncher`, remediation processes, and `rempl` scheduled tasks\n- **WSUS / SUP Posture**: Resolves `WUServer` / `WUStatusServer`, target group, `UseWUServer`, dual-scan, and policy-driven update-source settings\n- **Connectivity Testing**: Tests all Microsoft update endpoints\n- **LTSC/IoT Detection**: Identifies editions with limited update availability\n- **Post-repair Before/After Comparison**: Re-runs diagnostic check after repairs and displays side-by-side comparison table\n- **JSON RMM Report**: Optional `-JsonReport \u003cpath\u003e` writes pre/post diagnostics, changed fields, service deltas, phase results, and run metadata\n- **Progress Tracking**: Phase-by-phase progress bar with percentage (`Write-Progress`)\n- **Event Log Integration**: Writes repair summary to Windows Application event log (Source: `WURepair`) for RMM tool detection\n- **Selective Repair**: Run individual phases via `-RepairServices`, `-RepairDLLs`, `-RepairStore`, `-RepairDISM`, `-RepairSFC`, `-RepairNetwork`, `-RepairWaaS`, `-RepairDelivery`\n\n## Screenshots\n\n\u003cp align=\"center\"\u003e\n  \u003ci\u003eDiagnostics Output\u003c/i\u003e\n\u003c/p\u003e\n\n```\n    ╦ ╦╦ ╦  ╦═╗┌─┐┌─┐┌─┐┬┬─┐\n    ║║║║ ║  ╠╦╝├┤ ├─┘├─┤│├┬┘\n    ╚╩╝╚═╝  ╩╚═└─┘┴  ┴ ┴┴┴└─\n    Windows Update Repair Tool v2.11.0\n\n======================================================================\n  DIAGNOSTICS - Gathering System Information\n======================================================================\n    OS: Microsoft Windows 11 Pro (10.0.22631) Build 22631\n    Architecture: 64-bit\n    System Drive: 150.32 GB free of 476.94 GB\n\n    Windows Update Service Status:\n      Windows Update: Stopped (Manual)\n      Background Intelligent Transfer Service: Running (Manual)\n      Cryptographic Services: Running (Automatic)\n      Delivery Optimization: Running (Automatic)\n\n[+] No pending reboot detected\n[+] No Microsoft blocks in hosts file\n\n======================================================================\n  CONNECTIVITY - Testing Windows Update Servers\n======================================================================\n[+] Windows Update: Reachable\n[+] Microsoft Update: Reachable\n[+] Download Center: Reachable\n[+] Windows Update Catalog: Reachable\n[+] Delivery Optimization: Reachable\n```\n\n## Requirements\n\n- **OS**: Windows 10 / Windows 11 (all editions including LTSC/IoT)\n- **Privileges**: Administrator\n- **PowerShell**: 5.1 or later (included with Windows)\n- **Disk Space**: At least 5 GB free recommended\n\n## Installation\n\n1. Download `WURepair.ps1` from the [Releases](../../releases) page\n2. Save to a convenient location (e.g., Desktop)\n\n## Usage\n\n### Method 1: Right-Click Run\n1. Right-click `WURepair.ps1`\n2. Select **Run with PowerShell**\n3. If prompted by UAC, click **Yes**\n\n### Method 2: PowerShell Direct\n```powershell\nSet-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force\n.\\WURepair.ps1\n```\n\n### Command Line Options\n\n| Option | Description |\n|--------|-------------|\n| `-Quick` | Skip DISM and SFC scans (faster, less thorough) |\n| `-SkipDISM` | Skip only DISM component store repair |\n| `-SkipSFC` | Skip only System File Checker |\n| `-SkipBackup` | Skip backup of Windows Update folders |\n| `-StageSSU` | Before DISM, download and install an applicable Servicing Stack Update through Windows Update Agent |\n| `-JsonReport \u003cpath\u003e` | Write pre/post diagnostic delta as machine-parseable JSON |\n| `-Help` | Display help information |\n\n### Selective Repair Switches\n\nRun individual repair phases instead of the full pipeline:\n\n| Switch | Description |\n|--------|-------------|\n| `-RepairServices` | Only reset/restart Windows Update services |\n| `-RepairDLLs` | Only re-register Windows Update DLLs |\n| `-RepairStore` | Only rename SoftwareDistribution/catroot2 |\n| `-RepairDISM` | Only run DISM component store repair |\n| `-RepairSFC` | Only run System File Checker |\n| `-RepairNetwork` | Only reset network stack |\n| `-RepairWaaS` | Only reset Update Orchestrator services and USO tasks |\n| `-RepairDelivery` | Only reset Delivery Optimization cache and download mode |\n| `-RepairServicingStack` | Only download and install a matching Microsoft Update Catalog SSU package |\n| `-RepairAll` | Run all phases (default when no switch given) |\n\nSwitches can be combined (e.g., `-RepairStore -RepairDLLs`).\n\n### Examples\n\n```powershell\n# Full repair (recommended)\n.\\WURepair.ps1\n\n# Quick repair - skip lengthy scans\n.\\WURepair.ps1 -Quick\n\n# Skip only DISM\n.\\WURepair.ps1 -SkipDISM\n\n# Skip backup (if low on disk space)\n.\\WURepair.ps1 -SkipBackup\n\n# Only reset services\n.\\WURepair.ps1 -RepairServices\n\n# Reset data stores + re-register DLLs\n.\\WURepair.ps1 -RepairStore -RepairDLLs\n\n# Run DISM with Servicing Stack Update preflight\n.\\WURepair.ps1 -RepairDISM -StageSSU\n\n# Repair Servicing Stack directly from Microsoft Update Catalog\n.\\WURepair.ps1 -RepairServicingStack\n\n# Full repair with RMM-readable JSON report\n.\\WURepair.ps1 -JsonReport C:\\Temp\\WURepair-report.json\n```\n\n## What Gets Fixed\n\n### Hosts File Domains Unblocked\nThe tool removes blocks for these Microsoft domains (and more):\n\n| Domain | Purpose |\n|--------|---------|\n| `update.microsoft.com` | Windows Update service |\n| `download.windowsupdate.com` | Update downloads |\n| `download.delivery.mp.microsoft.com` | Delivery Optimization |\n| `ctldl.windowsupdate.com` | Certificate Trust List |\n| `settings-win.data.microsoft.com` | Windows settings sync |\n\n### Registry Policies Removed\n\n| Policy | Location |\n|--------|----------|\n| `DisableWindowsUpdateAccess` | Blocks WU UI access |\n| `DoNotConnectToWindowsUpdateInternetLocations` | Blocks online updates |\n| `NoAutoUpdate` | Disables automatic updates |\n| `UseWUServer` | Forces WSUS (when misconfigured) |\n| `SetDisableUXWUAccess` | Hides update settings |\n\n### Services Repaired\n\n| Service | Default State |\n|---------|---------------|\n| `wuauserv` (Windows Update) | Manual |\n| `bits` (BITS) | Manual (Delayed Start) |\n| `cryptsvc` (Cryptographic Services) | Automatic |\n| `dosvc` (Delivery Optimization) | Automatic (Delayed Start) |\n| `msiserver` (Windows Installer) | Manual |\n| `TrustedInstaller` (Modules Installer) | Manual |\n\n## Troubleshooting\n\n### \"Script won't run\" / Execution Policy Error\n```powershell\nSet-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force\n```\n\n### Still getting 403 Forbidden errors after repair\n- Check for third-party firewall software (Norton, McAfee, etc.)\n- Disable VPN temporarily\n- Check corporate proxy settings\n- Run the script again after restart\n\n### BITS service still won't start\n1. Restart your computer\n2. Run the script again\n3. If still failing, check Event Viewer for BITS errors\n\n### Updates found but won't install\n- Ensure at least 10 GB free disk space\n- Try installing updates one at a time\n- Run `DISM /Online /Cleanup-Image /RestoreHealth` manually\n\n### LTSC/IoT Edition - Limited Updates\nWindows 10/11 LTSC and IoT editions only receive security updates. Feature updates are not available. This is by design, not a bug.\n\n## Files Created\n\n| File | Location | Purpose |\n|------|----------|---------|\n| `WURepair_[timestamp].log` | Desktop | Detailed operation log |\n| `SoftwareDistribution.bak.[timestamp]` | C:\\Windows | Backup of update cache |\n| `catroot2.bak.[timestamp]` | C:\\Windows\\System32 | Backup of crypto cache |\n| `hosts.backup.[timestamp]` | C:\\Windows\\System32\\drivers\\etc | Backup of hosts file |\n\n## Recovery\n\nIf something goes wrong:\n\n1. **System Restore**: The script creates a restore point before making changes\n2. **Registry Backups**: Original registry values are logged\n3. **Folder Backups**: SoftwareDistribution and catroot2 are renamed, not deleted\n4. **Hosts Backup**: Original hosts file is preserved with timestamp\n\nTo restore the hosts file manually:\n```powershell\nCopy-Item \"C:\\Windows\\System32\\drivers\\etc\\hosts.backup.[timestamp]\" \"C:\\Windows\\System32\\drivers\\etc\\hosts\" -Force\n```\n\n## How It Works\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│                      WURepair v2.11.0 Flow                      │\n├─────────────────────────────────────────────────────────────────┤\n│  1. Diagnostic Pre-Check Report (status table)                  │\n│  2. Create System Restore Point                                 │\n│  3. Run Diagnostics (OS, services, disk, connectivity)         │\n│  4. Repair Hosts File (remove Microsoft blocks)                 │\n│  5. Repair SSL/TLS (enable TLS 1.2, strong crypto)             │\n│  6. Repair Firewall Rules (allow update traffic)               │\n│  7. Repair Service Dependencies (BITS, DO)                      │\n│  8. Remove Blocking Policies (registry cleanup)                 │\n│  9. Stop Update Services                                        │\n│ 10. Backup \u0026 Clear Caches (SoftwareDistribution, catroot2)     │\n│ 11. Re-register DLLs (35+ Windows Update DLLs)                 │\n│ 12. Reset Network Stack (Winsock, TCP/IP, DNS, proxy)          │\n│ 13. Reset Windows Update Agent                                  │\n│ 14. Optional SSU staging before DISM (-StageSSU)                │\n│ 15. Optional Catalog SSU repair (-RepairServicingStack)         │\n│ 16. Run DISM + analyzed component cleanup                      │\n│ 17. Run SFC (system file check)                                │\n│ 18. Start Update Services                                       │\n│ 19. Refresh Group Policy                                        │\n│ 20. Post-Repair Connectivity Test                               │\n│ 21. Post-Repair Verification (before/after comparison)          │\n│ 22. Trigger Update Scan                                         │\n│ 23. Write Event Log Summary / optional JSON report              │\n└─────────────────────────────────────────────────────────────────┘\n```\n\n## Privacy \u0026 Safety\n\n- ✅ **No data collection** - Everything runs locally\n- ✅ **No external downloads by default** - `-StageSSU` and `-RepairServicingStack` are opt-in update download paths\n- ✅ **Open source** - Full source code available for review\n- ✅ **Creates backups** - Cache and registry repairs can be reversed; `/ResetBase` is intentionally permanent for superseded updates\n- ✅ **Restore point** - System restore point created automatically\n- ✅ **Detailed logging** - Full audit trail saved to Desktop\n\n## Contributing\n\nContributions are welcome! If you encounter a Windows Update issue that WURepair doesn't fix:\n\n1. Run the script and save the log file\n2. Note any error messages\n3. Open an issue with the log and description\n\n## Changelog\n\n### v2.11.0\n- Added optional `-JsonReport \u003cpath\u003e` output for RMM ingestion\n- JSON reports include run metadata, options, phase results, pre/post diagnostics, changed fields, and service deltas\n\n### v2.10.0\n- Added optional `-RepairServicingStack` Microsoft Update Catalog SSU repair path\n- Catalog repair downloads the newest matching SSU `.msu`, installs it with `wusa.exe /quiet /norestart`, and retries the next match on `0x800f0922`\n\n### v2.9.0\n- Added `DISM /AnalyzeComponentStore` parsing before component cleanup\n- `StartComponentCleanup /ResetBase` now runs only when cleanup is recommended and reclaimable component-store data is at least 1024 MB\n\n### v2.8.0\n- Added optional `-StageSSU` / `-StageServicingStack` preflight before DISM\n- Uses Windows Update Agent to find, download, and install the latest applicable Servicing Stack Update before `RestoreHealth`\n\n### v2.7.0\n- Added `-RepairDelivery` to reset Delivery Optimization cache and stale download-mode policy values\n- Full repair now includes Delivery Optimization cache/policy reset\n\n### v2.6.0\n- Added `-RepairWaaS` to reset Update Orchestrator services and USO scheduled tasks\n- Full repair now refreshes USO settings and re-enables disabled `\\Microsoft\\Windows\\UpdateOrchestrator\\*` tasks\n\n### v2.5.0\n- Added WSUS / SUP posture diagnostics for `WUServer`, `WUStatusServer`, target groups, `UseWUServer`, dual-scan, and policy-driven update source settings\n- Added DNS resolution summaries and posture warnings for mismatched or incomplete WSUS policy state\n\n### v2.4.0\n- Added Microsoft Update Health Tools / Windows Remediation detection\n- Added `uhssvc`, `sedsvc`, `sedlauncher`, remediation process, install path/version, and `rempl` task diagnostics\n\n### v2.3.0\n- Added WaaSMedic service/task/event diagnostics to the pre-check report\n- Added Delivery Optimization peer cache health, active job count, peer count, cache size, and transfer byte totals\n\n### v2.2.0\n- Added ranked Windows Update HRESULT diagnostics from `%WINDIR%\\WindowsUpdate.log` and converted ETW traces\n- Added Microsoft reference links for the top recurring Windows Update error codes\n\n### v2.1.0\n- Diagnostic pre-check report with formatted status table (services, folders, DISM health, pending reboot, last update, recent errors)\n- Selective repair via `-RepairServices`, `-RepairDLLs`, `-RepairStore`, `-RepairDISM`, `-RepairSFC`, `-RepairNetwork` switches\n- Progress tracking with `Write-Progress` (Phase X of Y with percentage)\n- Event log integration: writes start/completion summary to Application log under source \"WURepair\"\n- Post-repair before/after comparison table\n- Triggers Windows Update check after all repairs\n\n### v2.0.0\n- Added hosts file cleanup for Microsoft domains\n- Added SSL/TLS configuration repair\n- Added firewall rules repair\n- Added service dependency repair (BITS, Delivery Optimization)\n- Added Windows Update policy removal\n- Added post-repair connectivity verification\n- Added LTSC/IoT edition detection\n- Improved service start logic (checks for disabled state)\n- Better error messages with actionable guidance\n\n### v1.0.0\n- Initial release\n- Basic service stop/start\n- Cache clearing\n- DLL re-registration\n- DISM/SFC integration\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Disclaimer\n\nThis tool modifies Windows system settings, registry values, and network configuration. While it creates backups and is designed to be safe:\n\n- **Use at your own risk**\n- **Always have backups** of important data\n- **Test in a VM first** if unsure\n- **A restart is required** after running\n- The author is not responsible for any issues arising from use of this tool\n\n## Related Tools\n\n- [DefenderShield](../DefenderShield) - Repair Windows Defender and Firewall after privacy tools disable them\n\n---\n\n\u003cp align=\"center\"\u003e\n  Made with ☕ by Matt\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysadmindoc%2Fwurepair","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysadmindoc%2Fwurepair","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysadmindoc%2Fwurepair/lists"}