auto-mount VHD Disks

On Server 2008 R2 and newer, VHD files can be mounted using Windows Disk Management MMC (diskmgmt.msc):


You can mount a VHD using the “Action” Menu:


But as soon as the Server gets restarted, you need to re-mound the VHD File manually. Microsoft provides no way to do this automatically using onboard tools. So you have the following choice:

  1. either create a batch script that calls fsutil.exe to mount the VHD file on startup
  2. or to use the cool and easy VHDattach Tool:

This tools allows you to open existing VHD files and select “auto-mount” (see screenshot):


I mounted a Backup Exec Dedup Store as VHD file. For my example, it was necessary to re-configure the Dedup Service to Delayed start in services.msc.

Cleaning up disk space

Cleaning up disk space by deleteing old Windows Updates was more easy on Windows XP than Win7 now. Updates are stored under the “%windir%\winsxs” folder, where you should not delete anything if you love your stable operating system.

A colleague just told me he found the trick to cleanup those updates, it’s just starting the following command under Win7 / Server 2008r2:

dism /online /cleanup-image /spsuperseded

This command cleans up the %windir%\winsxs folder which holds (among others) files for Service Packs. The only drawback to this procedure is that once executed you won’t be able to uninstall the Service Pack(s) any longer – so use it cautiously and at your own risk.

— edit 05-Nov-2012

Windows Vista and Server 2008 (r1) do not have dism included. To cleanup WinSxs there you can use “compcln.exe” instead, it removes all Service Pack files. Take care, you’ll not be able to downgrade from SP2 to SP1 after running this command.

— edit May-2014

There is an update from Microsoft available (KB2852386)┬áthat makes the Windows’ Cleanup Diskspace Feature able to cleanup WinSXS Folder files. Just install the update and follow the instructions in the KB Article.