DISM is a command-line Microsoft tool for Windows 7/8/2008/2012. DISM stands for ‘Deployment Image Servicing and Management’. If you do a search for dism.exe you will find many posts of people using it to reduce the size of their WinSxS folder, especially after installing SP1. There is a 32-bit and a 64-bit version of this tool.
The actual command to do this cleanup is: dism.exe /online /cleanup-image /spsuperseded
So, you are sitting at the console of a Windows 2008 R2 x64 server, and you want to run this utility. Chances are, you will try to use the dism.exe that is listed inside the c:\Windows\SysWow64 folder.
However, if you do so, you may encounter the following error message: Error: 11 You cannot service a running 64-bit operating system with a 32-bit version of DISM. Please use the version of DISM that corresponds to your computer’s architecture.
In order to run this properly, you need to go directly to the native system folder to run this tool on a 64 bit system. Here are the steps:
- Open command prompt window as administrator (‘Run as’).
- Change directory by typing: cd \windows\system32
- Run the command: dism.exe /online /cleanup-image /spsuperseded
This will take about ten minutes to run. Please note that even after the progress bar reaches 100.0%, the tool has not finished running. Do NOT close the command prompt window until you get the message “The operation completed successfully”.
What is the result of running this tool? I ran this on a Windows 2008 R2/SBS 2011 server, and it reduced the size of the WinSxS folder from 10.8GB to 7.37GB.
Not very drastic if you ask me. Not with today’s disk sizes. However, if you are running out of disk space on your server system drive, this might buy you some needed room!