What happened to the disk cleanup utility in Windows Server 2008?

What happened to the disk cleanup utility in Windows Server 2008?

One utility that has proved useful to me in the desktop edition of Windows is the Disk Cleanup tool, also known as cleanmgr. When invoked from a command line or batch script, it lets you perform various automated disk-cleaning operations such as emptying the Recycle Bin or removing temporary files from user directories. Being able to automate these things in Windows Server is handy, but anyone who tries to invoke cleanmgr from a command prompt in Windows Server 2008 will receive the generic "not recognized" error. What's going on here?

As it turns out, cleanmgr has not been removed entirely from Windows Server 2008. That's the good news. The bad news is, it is not set up by default. Cleanmgr and a slew of other programs including Windows Media Player (in case you're wondering why you couldn't find that in Windows Server 2008 either), are contained in a set of add-ons collectively labeled the Desktop Experience. This stuff isn't installed by default in Windows Server since, as the name implies, most of these features revolve around things most commonly done on the desktop.

Some of these features are useful on a server. Disk Cleanup is certainly one of them, but there are a few others including: the Snipping Tool, the Character Map, the aforementioned Windows Media Player and the Sound Recorder. The Character Map, in particular,

    Requires Free Membership to View

    By submitting your registration information to SearchWindowsServer.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchWindowsServer.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

is one worth keeping handy. For instance, it helps when dealing with user names in Active Directory that have accent marks or other punctuation marks that aren't accessible from a conventional keyboard.

There's two ways to install Disk Cleanup in Windows Server 2008. The first, and the more straightforward approach, is to install the Desktop Experience from the Add Features wizard (in Server Manager > Features). Keep in mind that this installs all the Desktop Experience components; there's no way to individually select which pieces to install. What's more, installing Desktop Experience automatically triggers the installation of another component you might not want, like the Ink and Handwriting Services subsystem. Adding any component to a server, even one not actually used, increases the attack surface. The less unused features you have hanging around in a server installation the better.

The other way to add Disk Cleanup is to manually copy it out from the Windows installation directory. This approach requires a little more care to be taken because it involves typing out long pathnames. Note also that if you are running the 32-bit version of Windows Server 2008, unlikely as that may be, the files will need to be copied from a slightly different location. Once copied, cleanmgr runs as it normally does, including the use of its command-line switches to store and recall different task settings.

ABOUT THE AUTHOR
Serdar Yegulalp has been writing about personal computing and IT for more than 15 years for a variety of publications, including (among others) Windows Magazine, InformationWeek and the TechTarget family of sites

This was first published in July 2011

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.

    Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.