KBI 311561 WINSXS Folder Causing Low Disk Space On Argent Server
Version
ALL Argent Products – Any Version
Date
Thursday, 3 August 2017
Summary
Like every application, Argent requires room to “grow” on the server Argent is installed on
If space becomes too limited, Argent will shut down causing the customer to miss important alerts concerning their environment or for jobs to fail to start
Technical Background
All Argent products have been designed to use limited amounts of space and perform regular maintenance to “trim the fat” such as cleaning up Argent log files older than 10 days, etc
Unfortunately, not all applications are as considerate as Argent
Surprisingly enough, one of the largest disk space hoarders is the Windows operating system itself especially with past Windows Updates
In Windows 2003, users could easily run Disk Cleanup periodically to clean out unused files in the WINSXS folder (home of ALL Windows Updates over the years)
Unfortunately, by default, there is no Disk Cleanup utility (cleanmgr.exe) in Windows Server 2008 / R2 and 2012 / R2
If a user wants to run Disk Cleanup, first the user has to install a separate server component, Desktop Experience, using either Server Manager or PowerShell (Install-WindowsFeature Desktop-Experience).
Desktop Experience comes with a price as it houses multiple other applications besides Disk Cleanup such as Windows Media Player, Desktop Themes, and Windows Defender
Fortunately, you can use an easier method to run Disk Cleanup
Just copy two files Cleanmgr.exe and Cleanmgr.exe.mui from WINSXS to system directory.
You can see commands to copy these files in different Windows versions below.
Windows Server 2008 R2 x64
-
copy C:\Windows\WINSXS\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7da\cleanmgr.exe C:\Windows\System32\
-
copy C:\Windows\WINSXS\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.1.7600.16385_en-us_b9cb6194b257cc63\cleanmgr.exe.mui C:\Windows\System32\en-US\
Windows Server 2008 x64
-
copy C:\Windows\WINSXS\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.0.6001.18000_none_c962d1e515e94269\cleanmgr.exe C:\Windows\System32\
-
copy C:\Windows\WINSXS\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.0.6001.18000_en-us_b9f50b71510436f2\cleanmgr.exe.mui C:\Windows\System32\en-US\
Windows Server 2012 x64
-
copy C:\Windows\WINSXS\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.2.9200.16384_none_c60dddc5e750072a\cleanmgr.exe C:\Windows\System32\
-
copy C:\Windows\WINSXS\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.2.9200.16384_en-us_b6a01752226afbb3\cleanmgr.exe.mui C:\Windows\System32\en-US\
Windows Server 2012 R2 x64
The copy commands will not work for Windows 2012 R2 as after the customer has completed the copy, the customer will receive the below error (or something similar) when attempting to launch the cleanmgr.exe file
With Windows 2012 R2 x64, it is easier to use the Deployment Image Servicing and Management application (DISM.exe) or install Desktop Experience
The customer can launch DISM.exe to clean out old updates with the below command line:
- dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
Alternatively, the customer can also do the following steps as well:
- Install Desktop Experience: Install-WindowsFeature Desktop-Experience
- Restart your server
- Copy the files %windir%\system32\cleanmgr.exe and %windir%\system32\en-US\cleanmgr.exe.mui to any directory (c:\temp for example)
- Uninstall the feature: Uninstall-WindowsFeature Desktop-Experience
- Restart
- Copy the files cleanmgr.exe and cleanmgr.exe.mui to the directories mentioned above
NOTE: Later both of the files can be copied to other servers or integrated into Win 2012 R2 virtual machine templates.
Resolution
N/A