How to add Disk Cleanup tool in Windows Server 2008 R2
Disk Cleanup option on drive’s general properties and cleanmgr.exe is not present in Windows Server 2008 or Windows Server 2008 R2 by default.So in order to use cleanmgr.exe you’ll need to copy two files that are already present on the server, cleanmgr.exe and cleanmgr.exe.mui.
- Copy “C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7da\cleanmgr.exe” to “%systemroot%\System32”
- Copy “C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.1.7600.16385_en-us_b9cb6194b257cc63\cleanmgr.exe.mui” to “%systemroot%\System32\en-US”
Now you can launch the Disk cleanup tool (cleanmgr.exe) from the command prompt.
You could also install the “Desktop Experience” feature this would also work, but why install something if you don’t need it, specially on a server.
More on this on TechNet