This tip is for the server administrators out there with messy disks on Windows Server 2008 and 2012.
I just finished upgrading all of my lab infrastructure to the newest coolest and cloudiest server OS, Windows Server 2012. I did an actual upgrade also, not a custom installation. The difference being that an upgrade will keep your files and folders in place so you do not lose any data; while a custom install will format your system disk.
The upgrade finished without a hitch on all on my machines; 2 domain controllers, 2 Hyper-V servers and a storage server. The only issue was that on all of my system drives I was running out of room, on account the system drives are SSD or virtual hard drives.
When you do an upgrade instead of a custom installation the machine will end up with a folder on the root of the system drive, normally C: called Windows.old. This is the old version of Windows and unless you have some files saved in the Windows or Program Files folders you can safely delete this after the upgrade is complete. Note that any files saved in the user profiles location will be copied to the new installation.
Only problem with deleting the Windows.old folder is that if you try to just delete the folder you will receive nasty errors and warnings like these.
Now you could go into the permissions and take ownership of all of the files and get through the system file warnings, but it would be much easier if you could just use Disk Cleanup Wizard to delete the old folder. Plus you get the option of deleting other non essential and temporary files with Disk Cleanup. Now to run the cleanup right-click the disk and select properties and there should be a button next to the pie chart of the disk, oops, it’s not there!
If you search for missing disk cleanup on Windows Server, you may end up at this Technet page; http://technet.microsoft.com/en-us/library/ff630161(v=ws.10).aspx. Which directs you to copy files from crazy Windows\WinSxS locations and run the Cleanmgr.exe program. I will have to track down how this got published, but just know that it is not a good practice to just go copying files from the Windows Component Store (WinSxS) willy nilly. Plus if you do this the button will still not be shown on the disk properties. So how do you get the disk cleanup back the right way?
The Desktop Experience feature is the feature that enables disk cleanup on Windows Server 2008 and 2012, so just install this feature and you can cleanup you disk as much as you want.
In Windows 2008 use Server Manager to add the feature.
In Windows Server 2012 it’s even easier, use PowerShell to enable the feature.
Now the button is back and you can delete the folder.
Now go clean you disks before the next tip!