While us pros usually stay away from this tool, it is needed sometimes. Recently I found myself in a situation where I wanted to run the “Disk Cleanup” Windows app, on a Windows Server 2019 VM running Server Core.
As you all know, Server Core has a limited GUI. You’re able to run things like a command prompt, Task Manager, notepad, and other limited things. I wanted to see if we could get Disk Manager running on it, because of it’s light UI I was thinking it may be possible.
How to install Disk Cleanup (cleanmgr.exe) on Windows Server 2019, Server Core edition
Two files are required for Disk Cleanup:
- cleangmgr.exe – The Disk Cleanup executable
- cleanmgr.exe.mui – I’m assuming this is the language files required for the application
The above files when installed, are stored here:
- C:\Windows\System32\cleanmgr.exe
- C:\Windows\System32\en-US\cleanmgr.exe.mui
When it comes to installing Disk Cleanup, you need to have those two files placed in their appropriate directories.
You can source these files from other servers (preferably running the same version of Windows Server), or you can snag the files from the WinSXS folder on a valid Windows install. An example of the WinSXS paths can be found below:
Windows Server 2016
- cleanmgr.exe – C:\Windows\WinSxS\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_10.0.14393.0_none_9ab8a1dc743e759a\cleanmgr.exe
- cleanmgr.exe.mui – C:\Windows\WinSxS\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_10.0.14393.0_en-us_8b4adb68af596a23\cleanmgr.exe.mui
After placing these files in their proper directory, you can open a command prompt and just type “cleanmgr” to launch the Disk Cleanup application.
These instructions also apply to the fully loaded version of Windows Server 2019 (full GUI), as well as previous versions.