Please note that the commands will only work on Windows 8 or newer machines.
Here is what you need to do to analyze the WinSXS Folder:
- Tap on the Windows-key, type cmd.exe, hold down Shift and Ctrl, and hit the enter key on the keyboard. This opens an elevated command prompt on the system.
- Run the command dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
The parameter /Online refers to the current installation, and /Cleanup-Image /AnaylzeComponentStore to analyzing the current component store of that installation (the WinSXS folder).
You can list all available commands using dism.exe /?, and subsequently dism.exe /Online /? and dism.exe /Online /Cleanup-Image /?.
The command runs a scan that takes a moment to complete. It echoes the Windows Explorer size and actual size to the command prompt window, and gives recommendations whether it makes sense to run a cleanup operation.
Windows runs a cleanup regularly using the Task Scheduler. You can check if that is the case on your machine in the following way:
- Tap on the Windows-key, type Task Scheduler and hit enter.
- Navigate to Task Scheduler (local) > Task Scheduler Library > Microsoft > Windows > Servicing > StartComponentCleanup
You can run the cleanup operation manually at any time using the following command using an elevated command prompt: