2

Is there any command line utility in Windows Server 2012 that will reduce the size of C:\Windows\WinSXS. On one of my main production systems that has Hyper-V and Remote Desktop Services, this folder and stuff beneath it is 30+ gigs.

Update That "It's 30 gigs I must fix this" urge was reduced when I realized that Windows reports the size of the folder as if it didn't use hard links, when in fact it does, so actually, it's not really as big as we might have thought. See the links in the comments below.

1

Uninstall unused features by running in admin mode :

Get-WindowsFeature | where-object{$_.Installed -eq 0 -and $_.InstallState -eq 'Available'} | uninstall-windowsfeature -remove

Free space in WinSxS using (some may not work depending on windows version):

dism.exe /online /Cleanup-Image /AnalyzeComponentStore
dism.exe /online /Cleanup-Image /StartComponentCleanup
dism.exe /online /Cleanup-Image /SPSuperseded
  • I'm going to test that first command on a VM before I try it in production. It looks okay though. – Warren P Mar 21 '16 at 17:21
3

Uninstall-WindowsFeature $FeatureYouDontWant -Remove is probably the best supported thing you can do to reduce Component Store size.

There are some tools that claim to be able to shrink WinSxS, but it's so easy to break your Windows installation by fiddling around in there, none of them are recommended.

  • 1
    And it turns out that the SxS store uses hard links and isn't really quite as big as Windows itself reports. – Warren P Jul 23 '13 at 14:00

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.