Enabling Disk Cleanup Utility in Windows Server 2012
- Open The Roles and Features Wizard
- Click on Add role and Feature to launch the add role and feature wizard
- Choose rolebase or feature based installation to install to local machine
- Click “next” all the way to features. Locate “User Interface and Infrastructure”. Click on “Desktop Experience”. Install additional required feature
- Make it sure that you reboot the system
- Verify that the Utility is indeed installed then run diskcleanup
Or alternately, executing the “Install-WindowsFeature Desktop-Experience” cmdlet in Powershell also works.