In short: Is it possible to leverage dism to capture an image of an entire disk as-is, akin to taking an image with Ghost, GParted, PartedMagic, CloneZilla etc.?

I've got a shiny new machine and before I tear into it, I'd like an image of the disk to get back to this point today. We use MDT and are in the process of standing up SCCM so I have some exposure to dism.

I know I can use dism to create WIMs of volumes with the caveat that they have to have letters assigned, right? What about entire disks as-is?

This machine has:

  • 1 disk
    • 5 partitions:
      • Recovery 1000MB
      • System 260MB
      • Reserved 128MB
      • Primary 462GB
      • Recovery 12GB
    • 5 volumes:
      • Vol 0: E DVD
      • Vol 1: C Windows OS
      • Vol 2: WINRE_DRV Hidden
      • Vol 3: SYSTEM_DRV Hidden
      • Vol 4: Lenovo_Recovery Hidden
      • Vol 5: D USB Boot Media

The only way I can think of to capture all this is to

  • Assign letters to the hidden volumes via diskpart (sel vol n > assign > repeat > exit) resulting in:
    • Vol 1: C Windows OS
    • Vol 2: F WINRE_DRV
    • Vol 3: G SYSTEM_DRV
    • Vol 4: H Lenovo_Recovery
  • Create the initial wim:
    • dism /capture-image /imagefile:\path\to\backup.wim /capturedir:c: /name:C-WinOS
  • Append other volumes to the initial wim:
    • dism /append-image /imagefile:\path\to\backup.wim /capturedir:F: /name:F-WINRE_DRV
    • dism /append-image /imagefile:\path\to\backup.wim /capturedir:G: /name:G-SYSTEM_DRV
    • dism /append-image /imagefile:\path\to\backup.wim /capturedir:H: /name:H-Lenovo_Reco

Is there a better/easier way?

  • 3
    Your method is the way. You image each partition into its own file. You then create the partitions and apply the image to the partition. I just did use this exact approach. – Ramhound Apr 7 '15 at 16:24
  • Is there any special reason why you want to use DISM? I think you’re terribly overcomplicating things. Just grab a LZO-compressed full disk image. – Daniel B Apr 7 '15 at 16:42
  • @DanielB: No 'special reason' per-se but... (a) Since I'm not the only one managing images, I find its easier for others if I keep things consistent. Some folks here may not know how to access another format. (b) I wanted to leverage existing technology & infrastructure to capture an image. I have a working 'capture-only' task sequence, but it wasn't getting everything which is what made me dive deeper into this. (c) I've also never thought of or tried creating an LZO-compressed disk image. Got any recommendations? Thanks again! – JuliusPIV Apr 7 '15 at 19:47
  • 1
    @AlexS - The DISM process is faster. I can create a .wim image of one partition and then apply it to a different partition all using a single PowerShell script. – Ramhound Jun 1 '17 at 17:25
  • 1
    hey @AlexS - By the time I had posted to SU, I had already executed and it worked well. Fortunately, I didn't need to go back to that configuration so I ultimately destroyed the WIM. If you're familiar with PowerShell, and on a recent version, like 5 - check $PSVersionTable.PSVersion - then it's worth looking into if you have an unusual layout. When I build machines from scratch, I don't create a disk layout like this; usually its manufacturers like Dell, Lenovo & HP that do things like this and this was a one-off. (and thank goodness for that!) – JuliusPIV Jun 5 '17 at 21:01

It is possible, but not necessarily easy. You could use /Append-Image to capture all partitions to one WIM file and then deploy each partition with DISM from that WIM file on the other side. It still isn’t a sector-based image or a disk level image, DISM is a volume imaging tool that uses WIM file-based imaging.

Another alternative is that you could Disk2VHD the reference system and then use Boot to VHD to boot the deployed systems.

| improve this answer | |

You can now do it easily with the new "Windows Full Flash Update", integrated in DISM starting from Windows 10 v1709

| improve this answer | |
  • 1
    I haven't tried this yet but I'll explore this further. On the surface this looks exactly like what I needed, albeit 3 years ago. ;) I really do appreciate this golden nugget! – JuliusPIV Jan 1 '19 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.