Wednesday, November 25, 2015

Creating a Single WIM Windows 10 from Multiple Images (Windows 10 Enterprise and Windows 10 Professional in the same WIM)

Creating a Single WIM Windows 10 from Multiple Images (Windows 10 Enterprise and Windows 10 Professional in the same WIM)



You can create a single WIM with multiple images directly in MDT, using the same standard image capture process. To do this you launch an image deployment and proceed through the Deployment Wizard. Once on the Capture screen, select Capture and provide a name for the WIM or accept the default, then begin the deployment. Once the deployment and capture have finished, launch another image deployment and proceed through the Deployment Wizard. Once on the Capture screen, select Capture and provide the exact same name and location as the previous capture. The MDT ZTIBackup script, which completes the actual capture of an image, will recognize the WIM already exists, and it will append the new image to the existing WIM. When doing this the ZTIBackup script uses the Task Sequence ID and the Drive letter to create the image name. Because each image within a WIM must have a unique image name, you cannot use the same Task Sequence to append multiple images to the same WIM without customizing the default MDT scripts or manual modification to the WIM. However, using separate task sequences provides the ability to append images to a WIM within MDT without any customization.
Now let’s go back to our initial scenario. You now know you can consolidate your custom images and you can do this when you create and capture a new image using MDT, but how do you do it for WIMs that you have already created? You have already done so much work; does this mean you have to start over again? Do you have to recapture all your custom images again? The answer is no. You can consolidate all your existing custom images using ImageX.
ImageX is a free command-line tool that is part of the Microsoft Windows Automated Installation Kit (WAIK).  MDT is actually using ImageX in many of its processes for creating, managing and deploying your custom images. MDT uses the ImageX append switch to append an image into an existing WIM. However, there’s another option within ImageX that will allow you to create a single WIM that contains multiple images—the export switch. The export switch is used to export an image file from one WIM and create a new WIM based on that export. For example, you have a WIM named W10PROX64.wim and you want to create a new WIM called Win10.wim. To do this you would run the following command:
ImageX /export W10PROX64.wim 1 Win10.wim "Windows 10 Professional X64"
In this command “Windows 10 Professional X64” represents the name being assigned to the image being imported. Now let’s say you want to add another image to the Win10.wim. To do this you would run the following command:
ImageX /export W10ENTSP2X64.wim 1 Win10.wim "Windows 10 Enterprise X64"
As mentioned previously, when you combine multiple images into a single WIM, each image must have a unique image name. Along with a unique image name, each image will be also assigned an image index number. These numbers are assigned in chronological order as the images are imported into the WIM file, and cannot be modified. In our example the Windows 10 Professional X64 will have an index number of 1 and Windows 10 Enterprise X64 will have an index number 2. Whether you’re modifying or installing an image from a single WIM with multiple images, the image index number will be required to correctly identify the image within the WIM.

Whether you’re using MDT or ImageX from the command line, you can only merge one image to an existing WIM at a time. So for each proceeding capture you want to merge into your existing WIM, you must wait for the previous deployment and capture process to complete before beginning the next one. Both Imagex switches will use the hashing algorithm described earlier to de-duplicate any files when storing the images within the WIM.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.