Skip to content

Instantly share code, notes, and snippets.

@jlafitte
Last active March 29, 2018 18:26
Show Gist options
  • Select an option

  • Save jlafitte/734e8b30f84c5441823d84d4b627d0cd to your computer and use it in GitHub Desktop.

Select an option

Save jlafitte/734e8b30f84c5441823d84d4b627d0cd to your computer and use it in GitHub Desktop.
Windows Server 2008 Clean Manager Enabler
@echo off
echo Installing Disk Cleanup if not already installed.
if not exist %SYSTEMROOT%\System32\cleanmgr.exe (
copy /Y C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7da\cleanmgr.exe %SYSTEMROOT%\System32\
)
if not exist %SYSTEMROOT%\System32\en-US\cleanmgr.exe.mui (
copy /Y C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.1.7600.16385_en-us_b9cb6194b257cc63\cleanmgr.exe.mui %SYSTEMROOT%\System32\en-US\
)
echo Now running Disk Cleanup.
start cleanmgr.exe
@jlafitte

jlafitte commented Mar 29, 2018

Copy link
Copy Markdown
Author

As documented here

This might also work in Windows Server 2012, I'm not positive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment