Disk Cleanup on Windows Server 2008 Without Installing Desktop Experience Posted on by Tomas Windows Server 2008 is something every admin likes to work with (sense the sarcasm over the Internet, Dr Cooper?). Is your Win10 an upgrade, or clean install? - Have you run Disk Cleanup w/ Cleanup System files yet? Was there no benefit? As this is a Windows system folder dealing with patch and updates for Windows functions I would also be very wary of messing with it. I believe you will have already read SpiritX's comments on the other thread.
By default, in Windows Server 2008 / R2 and 2012 / R2 there is no Disk Cleanup (cleanmgr.exe) utility that allows to delete unused files and clean up the WinSxS folder and component store from the files of updates that are no longer required. To run it, first you have to install a separate server component Desktop Experience using either Server Manager or PowerShell (Install-WindowsFeature Desktop-Experience).
Tip. To use cleanmgr to delete deprecated updates on Windows 2008 R2 / Windows 7 SP1, install KB2852386.
Together with Desktop Experience, many other unnecessary components are installed on the server:
To run Disk Cleanup on Windows Server, you can use an easier method: 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:Windowswinsxsamd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7dacleanmgr.exe C:WindowsSystem32
copy C:Windowswinsxsamd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.1.7600.16385_en-us_b9cb6194b257cc63cleanmgr.exe.mui C:WindowsSystem32en-US
Windows Server 2008 x64
copy C:Windowswinsxsamd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.0.6001.18000_none_c962d1e515e94269cleanmgr.exe C:WindowsSystem32
copy C:Windowswinsxsamd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.0.6001.18000_en-us_b9f50b71510436f2cleanmgr.exe.mui C:WindowsSystem32en-US
Windows Server 2012 x64
copy C:WindowsWinSxSamd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.2.9200.16384_none_c60dddc5e750072acleanmgr.exe C:WindowsSystem32
copy C:WindowsWinSxSamd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.2.9200.16384_en-us_b6a01752226afbb3cleanmgr.exe.mui C:WindowsSystem32en-US
To start Disk Cleanup, run cleanmgr.exe command with the administrator privileges.
Windows Server 2012 R2 x64
The method described below doesn’t work in Windows Server 2012 R2 due to the changes made by KB2821895 update. The matter is that after you install this update, compression is used to store the binary files of the components. When trying to run the copied cleanmgr.exe, the following error appears:
Unsupported 16-Bit Application
The Program or feature ??C:Windowssystem32cleanmgr.exe cannot start or run due to incompatibility with 64-bit version of windows
As a workaround, you can use this method:
Later both of the files can be copied to other servers or integrated into Win 2012 R2 virtual machine templates.
Tip. To delete the obsolete updates in Windows Server 2012 R2, it’s easier to use the following DISM command:
dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase Fixing Windows Update and DISM Error 0x80073712 on...January 15, 2020Installing a Free Let’s Encrypt TLS/SSL Certificate on...December 31, 2019Windows 7: End of Support Notifications, Extended Security...December 27, 2019PSWindowsUpdate: Managing Windows Updates from PowerShellDecember 23, 2019How to Backup Hyper-V Virtual Machines?December 10, 2019Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |