Capture Images of Hard Disk Partitions by Using ImageX

Applies To: Windows 7, Windows Server 2008 R2


This content applies to Windows 7. For Windows 8 content, see Windows Deployment with the Windows ADK.

You can use the ImageX tool to capture Windows® Image (.wim) files for deployment.


  1. Create a Windows PE disk with the ImageX tool added. See Walkthrough: Create a Bootable Windows PE RAM Disk on CD-ROM for instructions on creating a Bootable Windows PE RAM disk, including the optional steps for adding ImageX.

  2. Create an ImageX configuration file. For more information, see Create an ImageX Configuration File.

  3. Create a reference computer by deploying Windows, and then removing the computer-specific information from the system. For more information, see Prepare to Capture an Image for Deployment (Generalize).

Determining which partitions to capture

This table shows the types of partitions that you must capture and those that are managed automatically.

Partition type Should you capture this partition?

System partition (BIOS system partition or EFI System Partition)


If only a simple set of partition files is required, you do not need to capture this partition.

Microsoft Reserved partition (MSR)


Primary partitions (Windows partitions, utility partitions)


Extended partition


Logical partitions (Windows partitions, utility partitions)


Capturing an image

  1. Start your reference computer by using Windows PE. For more information, see Booting Windows PE.

  2. If any of the partitions you want to capture do not already have a drive letter assigned, assign a letter using the DiskPart command.

    1. At the Windows PE command prompt, type diskpart to open the DiskPart tool.

      X:> diskpart
    2. Select the hard disk with the select disk command. For example,

      DISKPART> select disk 0
    3. View the partitions with the list partition command. For example,

      DISKPART> list partition
      DISKPART> list partition
        Partition ###  Type              Size     Offset
        -------------  ----------------  -------  -------
        Partition 1    Primary            300 MB  1024 KB
        Partition 2    Primary            200 GB   301 MB
    4. Select the partition with the select partition command. For example,

      DISKPART> select partition=1
    5. Assign a letter to the partition with the assign letter command. For example,

      DISKPART> assign letter=S
    6. Type exit to return to the Windows PE command prompt.

      DISKPART> exit

    For more information, see the DiskPart Help from the command line, or Diskpart Command line syntax.

  3. At the Windows PE command prompt, open the directory that contains the ImageX tool. For example,

    cd C:\Windows\System32
  4. Capture images for each customized partition.

    To capture the images, use the ImageX command with the /capture option. For example,

    imagex /capture c:\ c:\my-windows-partition.wim "My Windows partition"
    imagex /capture s:\ c:\my-system-partition.wim "My system partition"

    Optionally, you can set the following additional options to the imagex /capture command: /boot, /check, /compress, /config, and /scroll, and /verify. For more information about these flags, see ImageX Command-Line Options.

  5. Connect to your distribution share by using the net use command. For example,

    net use n: \\Server\Share

    If prompted, provide your network credentials.

  6. Copy the partitions to your network share. For example,

    md N:\Images\
    copy C:\my-windows-partition.wim N:\Images\
    copy c:\my-system-partition.wim N:\Images\

Next Steps

After the image is captured and stored, you can:

See Also


ImageX Command-Line Options
BCDboot Command-Line Options