This page looks best with JavaScript enabled

Build and Capture Windows 11 21H2 Reference Image

News and Updates

  • Currently a Build and Capture Task Sequence doesn’t seem possible, as Sysprep breaks. This looks to be an issue with MDT whihc will require an update to properly support Windows 11.

  • An important update for Microsoft Deployment Toolkit (MDT_KB4564442) has been released. This update fixes a boot loop issue. Download the update here.

  • There is no x86 version of Windows 11

  • This article is based on Windows 11 insider build 22000.132. I will update it in future as things progress.

In this article as with my previous ones we will walk through installing and configuring Microsoft Deployment Toolkit to build and capture a reference image of Windows 11 21H2 using a Hyper-V Virtual Machine. It’s assumed that you have a server or PC ready to install MDT and create a file share for MDT to build the image with. Here are the links to the software we’ll be using:

Installing Microsoft Deployment Toolkit and Dependencies

  1. First, we’ll install the Windows 11 ADK. During setup additional files will need to be downloaded, so it may take some time depending on your internet connection.
  2. On the Select the features you want to install screen select:
    • Deployment Tools
    • Imaging And Configuration Designer (ICD)
    • Configuration Designer
    • User State Migration Tool (USMT)
  3. WinPE is a separate install. Install the WinPE add-on by running the adkwinpesetup.exe, there is no specific configuration during the install wizard.
  4. Now install MDT by running the setup file downloaded earlier. There is no specific configuration during the install wizard.
  5. Finally, extract the files from MDT_KB4564442, and copy them to %ProgramFiles%\Microsoft Deployment Toolkit\Templates\Distribution\Tools replacing the existing files.

Creating the Deployment Share

  1. Open the Deployment Workbench from the Start Menu.
  2. Right click on Deployment Shares.
  3. Select New Deployment Share.
  4. Enter the path for the Deployment Share: E:\Build.
  5. Enter the Share nameBuild$.
  6. Give the share a description.
  7. On the Options screen, accept the defaults as you can change them later.
  8. Complete the wizard to create the share.
  9. By default, the share permissions are set the local administrators group. We’ll revisit this later.

Adding an Operating System

  1. Mount the Windows 11 21H2 ISO in File Explorer.
  2. Go to Deployment WorkbenchOperating Systems.
  3. Right click and select New Folder.
  4. Enter the name Windows 11 21H2 and click through the wizard to create the folder.
  5. Right click again and select Import Operating System.
  6. In the wizard, select Full set of source files and then enter the root of the mounted ISO as the Source directory.
  7. For the destination directory name enter Windows 11 21H2 and complete the wizard.
  8. Go to the Operating Systems/Windows 11 21H2 node and rename the new entries added to Windows 11 21H2 Edition for ease of use.

Creating Package Folder for Future Updates

  1. Go to Deployment Workbench > Packages.
  2. Create a folder named Windows 11 21H2.

Now we’ll create a selection profile so that the Task Sequence only attempts to install updates for Windows 11 21H2 that we make available through MDT.  

Creating A Selection Profile

  1. Expand the Advanced Configuration node.
  2. Right click on Selection Profiles and select New Selection Profile.
  3. Name it Windows 11 21H2.
  4. On the Folders page, tick the Windows 11 21H2 folder under Packages and complete the wizard.

Importing Applications

If you want to add some applications to be a part of your reference image, here I’ll cover how to add VLC as an example application.

  1. Go to Deployment WorkbenchDeployment Share > Applications.
  2. Right click on Applications and select New Application.
  3. In the New Application Wizard, choose Application with source files.
  4. Give the application the name: VLC.
  5. Enter the Source directory of the installation files.
  6. Enter the Destination directory: VLC.
  7. For the Command line enter anything, we’ll revisit this later.
  8. On the summary page, click Next and after the files are copied click Finish to complete the wizard.

Configuring Applications

  1. Right click on VLC, go to the Details tab.
  2. Enter the following for the Quiet install command: vlc-setup.exe /S

VLC is now set up to be installed silently by the Task Sequence.

To add other software, you’ll need to repeat the steps above, with the relevant Command line to silently install them. Below are a few command lines for some software I frequently install silently, along with the links to the ‘offline’ installers.

Google Chrome - Enterprise Installer

msiexec /I googlechromestandaloneenterprise64.msi /qn

Adobe Reader - Enterprise Installer

AdobeReaderDC.exe /sAll

We now need to create a new Task Sequence to create a reference image.  

Creating a Task Sequence

  1. In Deployment Workbench, go to Task Sequences.
  2. Right click and select New Task Sequence.
  3. For the ID enter: W11-21H1.
  4. Name it Build Windows 11 21H2.
  5. Select Standard Client Task Sequence.
  6. Select the Operating System Windows 11 21H2.
  7. Select Do not specify a product key at this time.
  8. Enter an Organization name.
  9. Select Do not specify an Administrator password at this time.
  10. Complete the wizard.

Now we’ll configure the Task Sequence.  

Configuring the Task Sequence

  1. Right click on the Task Sequence just created and select Properties.
  2. Go to the Task Sequence tab on the Properties window of the Task Sequence.
  3. Expand the Preinstall folder and select the Apply Patches item.
  4. Change the Selection Profile to Windows 11 21H2.
  5. Go to the State Restore folder and select Windows Update (Pre-Application Installation).
  6. On the right side of the Properties window, go to the Options tab.
  7. Uncheck the Disable this step tick box and do the same with Windows Update (Post-Application Installation).
  8. If you skipped the Importing Applications section, please disable the Install Applications item and go to step 16, if not please continue.
  9. Go to the Install Applications item.
  10. In the right side of the Properties box, select the Install a single application option and click the Browse… button.
  11. Select Google Chrome and change the name Install Applications to Google Chrome.
  12. Install other Applications, copy and paste the Install Applications item and repeat steps 13 - 15 for the applications of your choice.
  13. Click Apply and close the Task Sequence.

Next, we’ll create a domain user account for MDT for use as a service account.  

Creating a service account for MDT in Active Directory

  1. Go to Active Directory Users and Computers.
  2. Create a user called mdt_admin and give it a complex password.
  3. Go to the Server or PC where the Deployment Share is hosted.
  4. Give the user mdt_admin Full Control share permissions and Full Control permissions to all the files and folders in the Deployment Share.

Next, we need to configure the Bootstrap.ini and the CustomSettings.ini files to control certain aspects of the deployment environment. The settings below enable auto log in and skip the welcome screen, so these should only be used for lab or closed development environments.  

Configuring Bootstrap.ini

  1. In Deployment Workbench, right click the Deployment Share and select Properties.
  2. Select the Rules tab and click the Edit Bootstrap.ini button.
  3. Add the settings below to the Bootstrap.ini.
  4. Close and Save the Bootstrap.ini
1
2
3
4
5
6
7
8
9
[Settings]
Priority=Default
 
[Default]
DeployRoot=\\SERVER-NAME\Build$
UserDomain=contoso.com
UserID=mdt_admin
UserPassword=p@ssw0rd
SkipBDDWelcome=YES

Configuring CustomSettings.ini

On the Rules tab of the Deployment Share properties window, add the settings below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[Settings]
Priority=Default
Properties=MyCustomProperty

[Default]
OSInstall=Y
SkipCapture=YES
SkipAdminPassword=YES
SkipProductKey=YES
SkipComputerBackup=YES
SkipBitLocker=YES
SkipLocaleSelection=YES
SkipTimeZone=YES
SkipDomainMembership=YES
SkipSummary=YES
SkipFinalSummary=YES
SkipComputerName=YES
SkipUserData=YES

_SMSTSORGNAME=Build Share
_SMSTSPackageName=%TaskSequenceName%
DoCapture=YES
ComputerBackupLocation=\\SERVER-NAME\Build$\Captures
BackupFile=%TaskSequenceID%_#year(date) & "-" & month(date) & "-" & day(date) & "-" & hour(time) & "-" & minute(time)#.wim

; If you want to use a WSUS server for updates, use this line, remove or comment out for updates from the internet
WSUSServer=http://WSUS-SERVER-NAME:8530

FinishAction=SHUTDOWN
SLShare=\\SERVER-NAME\Build$\Logs
EventService=http://SERVER-NAME:9800

We now need to create the boot media to boot the VM into the deployment environment.  

Creating the Boot Media

  1. In Deployment Workbench, right click on the Deployment Share.
  2. Select Update Deployment Share.
  3. Select Completely regenerate the boot images.
  4. Complete the wizard. It will take some time to create the boot images.

Testing and Capturing a Reference Image

To test everything, we need to copy the ISO file that we just generated. It is in the Boot folder in the Deployment Share. Go to the Server or PC that is hosting the deployment share and navigate to the boot folder. Inside there should be a file named LiteTouchPE_x64.iso. Copy this file to a location where a Hyper-V Virtual Machine will be able to access it.

Create a new VM in Hyper-V with the following configuration:

  • For Hyper-V Only: Generation 1, not 2. I’ve had issues reported with Gen2 VMs.
  • At least 2x vCPUs
  • At least 4GB of RAM
  • Network Adaptor with access the local network.
  • Virtual Hard Drive of at least 40GB, preferably on fast media.
  • Boot from CD using the LiteTouchPE_x64.iso from MDT.
  • Make sure Use Automatic Checkpoints is disabled.

Start the VM and it will boot from the LiteTouchPE_x64.iso into the deployment environment. You will be presented with a screen with the name of the Task Sequence you created earlier. Select your Task Sequence and click Next and the task sequence will begin. The Task Sequence will install Windows 11 21H2, update from the internet/WSUS server, install the optional applications if you added them, and then run Windows Update from the internet/WSUS server again. It will then run SysPrep and attempt to reboot back into the deployment environment from the local disk and send the image to the MDT server.

When this process completes the VM will be shutdown and a file named W11-21H1_YEAR_MONTH_DAY_HOUR_MINUTE.wim will be in the Captures folder in the Deployment Share.

You now have a reference image for Windows 11 21H2 and a Microsoft Deployment Toolkit installation, with a deployment share specifically configured for building and capturing reference images. To deploy them image create a deployment share for all the deployment requirements.

Support My Work

Please consider supporting my work:

  • Sign up using Patreon.
  • Support with a one-time donation using PayPal.

If you’d like to contact me, please leave a comment, send me a tweet or DM, or you can join my Discord server.

-Mike

Share on
Support the author with