Repair-WindowsComponentStore

1.0.0

Automates Windows Component Store (WinSxS) diagnostics, repair, and cleanup in a single guided run. Automatically elevates to Administrator, runs DISM /ScanHealth (triggering /RestoreHealth only when corruption is found), verifies protected system files with SFC /scannow, and executes DISM /StartComponentCleanup only if /AnalyzeComponentStore recommends it.

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name Repair-WindowsComponentStore

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2026 waresoft. All rights reserved.

Package Details

Author(s)

  • waresoft

Tags

PowerShell Windows Windows10 Windows11 SysAdmin Maintenance DISM SFC WinSxS SystemRepair Troubleshooting Automation

Functions

Pause-Script

Dependencies

This script has no dependencies.

Release Notes

Initial release (v1.0.0):
- Auto-elevates to Administrator if launched in a standard session.
- Runs DISM /ScanHealth (using /English for locale-safe parsing) and conditionally triggers /RestoreHealth only when corruption is detected.
- Runs SFC /scannow to verify and repair protected system files.
- Runs DISM /AnalyzeComponentStore and conditionally triggers /StartComponentCleanup only when cleanup is recommended.
- Reports exit codes and pauses on completion so results remain visible.

FileList

Version History

Version Downloads Last updated
1.0.0 (current version) 10 11/23/2026