This post will help you to manage the deployment of Windows Captured Image & Deploy Windows Image using MDT + SCCM. Let’s learn How To Deploy Windows 10 Image Using Microsoft Deployment Toolkit (MDT) and the same image can be used in SCCM or MECM.
In my previous post,described about the working mechanism of Sysprep tool and process of capturing the Windows Image Learn How to Sysprep Capture Windows 10 Image using DISM. Since we had successfully captured windows image,the next step would be deploy the captured image.
Introduction – Deploy Windows 10 Image
We have many options to manage and proceed the deployment.Here we will choose the Microsoft Deployment Toolkit (A.K.A MDT) to deploy the captured WIM File.
Microsoft Deployment Tool (MDT) will allow you to create Zero Touch Installation to deliver an automated deployment scenario.
- Requires no interaction by the user.
- Users do not need to know any configuration information prior to initiating the deployment process.
- You can customize your task sequence much easier.
- It can preconfigure the user profile as well apply users based settings and customizations.
- With CopyProfile you can make changes to default user settings and apply to the user profile on system during deployment.
- Microsoft Deployment Toolkit (MDT) 8456 Download
- Windows ADK 10 v1903 Download
- WinPE Addon for Windows ADK 10 v1903 Download
- Windows 10 Image
- Configure MDT Deployment Share to Create Reference Image
Implementation Activities & Tasks
Import Custom Image for Deployment
- Expand the Deployment Shares and the MDT Deployment Share.
- Create a folder structure inside the Operating Systems, This helps to organization of selection profiles. Right Click in Operating Systems > Created Folder and select Import Operating System
Select Custom Image file to add a captured image that you wish to deploy.
Click on Browse, Specify the location of wim file. After Specify the full path, you can check the box to move the files to the deployment share and Click Next. Just to save your time!
Don’t forget to keep copy of imorted Image.
Select Setup files are not needed and Click Next.
Accept this default directory name or specify the name of the directory and Click Next.
Review the values and Click Next.
You will get a message “The Import Operating System Wizard completed successfully” Click Finish.
The captured image of the reference computer is added under Operating Systems.
Prepare the drivers repository
You need to download all device drivers for required models available in OEM Manufacturer website.Once you have downloaded the necessary drivers, store for specific model in a folder.
Download Extract and Import Drivers within your folder into MDT
Next, we want to create a folder structure under the Out-of-Box Drivers node in MDT to organize our drivers. This will not only allow easy manageability of drivers.To add drivers for the operating system of different hardware models, Check this Microsoft Blog.
Create and Configure the MDT Task Sequence
Right-click on the Task Sequence node and select “New Task Sequence”.
Provide the Task sequence ID and Task sequence name.
Select Template Standard Client Task Sequence from available list.
Select OS: choose the imported Custom Image to deploy with this Task Sequence.
Select Do not specify a product key at this time.
Fill the fields Full Name, Organization, Internet Explorer Home Page (these fields can be modified through Answers File on later stage) and click Next.
Select Don’t specify an Administrator password at this time Option. Click Next.
Review the details and Click Next.
Task Sequence creation process completed successfully.Click Finish to close wizard.
What we have now is a pretty bare-bones task sequence which will only install Windows and nothing else. We need to edit Task Sequences add custom steps to perform others needed action with this Windows installation into a target machine.
Customize the Task Sequence
Edit the task sequence by navigating to the Task Sequences, right click on created task sequence Name and select Properties.
In the task sequence, under the Preinstall section, we will configure the Inject Drivers step to use the selection profile > Nothing.
We will add a custom Task Sequence Variable step above the Inject Drivers step to set our DriverGroup001 variable to point to the path of the model that we are installing the %model% variable filled.
Task Sequence will be appear as shown below,Apply changes click on Apply and OK.
Answer files (unattend.xml)
Right-click on the task sequence you created and choose “Properties”. On the “OS Info” tab click on “Edit Unattend.xml” which will Windows System Image Manager.
It started to generate a catalog file automatically for the selected WIM. This process could take a while depending on your configuration.
Once the generation is complete, you’re free to make changes to your Unattend.xml.
For all of the unattended settings that can be apply with answer file. Complete description about components, see this Microsoft Docs Unattend Components.
Run the Validation check,click on the Tools menu and select Validate Answer File.
Now, in the Messages area at the bottom of the screen, you should see that your validation answer file has errors. Double click on any results to be taken right to that setting to remediate any issues. Make the necessary changes, validate the answer file, save and exit.
Create a Selection Profile
Selection profiles, which are available in the Advanced Configuration node, provide a way to filter content in the Deployment Workbench. Selection profiles are used for several purposes in the Deployment Workbench and in Lite Touch deployments. For example, they can be used to:
- Control which drivers and packages are injected into the boot images.
- Control which drivers are injected during the task sequence.
- Control what is included in any media that you create.
- Control what is replicated to other deployment shares.
- Filter which task sequences and applications are displayed in the Deployment Wizard.
Expand Advanced Configuration.Right Click on Selection Profiles and select New Selection Profile.
Provide the Selection profile name and Comments for best practice.
Here we can select the lists of available applications, Operating Systems, Drivers, Packages and Task Sequences which we need to include in Image.
Note : Selecting more than what is necessary will result in larger than necessary ISO files and USB storage requirements.
Once done with selection, Click on Next.
Here we will get a summary page with detailed informations.
Click on Finish button to complete the process.
A custom Selection Profiles has created based on your selection.
Note: If you need to make any changes on later stage, you can modify the selection profiles by right click > properties in created profile.
Creating an Offline MDT Deployment Media
Right Click on Media and select New Media.
Under New Media Wizard provide the Media path by clicking on browse option.Here we have created a new directory under C drive named “MDT Offline Media”.
Note: The path of provided directory should be empty.
Now select the selection profile form the drop-down list which was created earlier.
Review the selected values and Click on Next.
Please wait for a while to complete the process.Once you will a get a message “The Process completed successfully”. Click on Finish.
Under Media, Now you can see new media has created.
Right click in media [here in mine case it’s MEDIA001] and choose Properties.
Select the Platforms Supported, Provide the appropriate name for ISO.
Configure MDT Deployment Share Rules
You modify the two rules files (Bootstrap.ini and CustomSettings.ini) to automate media Installations. The rules control the Windows Deployment Wizard on the client and provide the following settings to the machine being deployed:
- Computer name
- Domain to join, and organizational unit (OU) in AD to hold the computer object
- Whether to enable BitLocker
- Regional settings You can manage hundreds of settings in the rules.
Click on the Rules tab where you will get default settings.
Important! Generate a computer name based on a serial number
A serial number can contain more than 15 characters, but the Windows setup limits a computer name to 15 characters. More Details Configure MDT deployment share rules
Below you find the configurations I used, you can modify the Rules to use in deployment process based on Toolkit Reference.
Select the Rules tab and modify properties window using the sample information.
[Settings] Priority=Default [Default] _SMSTSORGNAME=Test Infra OSInstall=YES OSDComputerName=PC-%SerialNumber% SkipApplications=YES SkipAppsOnUpgrade=YES SkipBitLocker=YES SkipCapture=YES SkipComputerName=YES SkipComputerBackup=YES SkipDeploymentType=YES DeploymentType=NEWCOMPUTER SkipDomainMembership=YES SkipAdminPassword=YES AdminPassword=P@ssWord SkipLocaleSelection=YES KeyboardLocale=en-US UserLocale=en-US UILanguage=en-US SkipPackageDisplay=YES SkipProductKey=YES SkipSummary=YES TimeZoneName=UTC SkipTimeZone=YES SkipUserData=Yes SkipTaskSequence=YES TaskSequenceID=W10X64 _SMSTSOrgName=Test Infra SkipFinalSummary=NO
Click Edit Bootstrap.ini will open configuration in notepad and modify using the following information.
[Settings] Priority=Default [Default] SkipBDDWelcome=YES
Click on Apply to save the changes and Click on OK to close the Media Properties.
You can create separate folders under your Out-of-Box Drivers node for WinPE_x86 and WinPE_x64 drivers and add the drivers. In the Windows PE tab, in the Platform drop down list, make sure x64 is selected. select the Drivers and Patches tab.
By default, MDT will inject all network adapter and mass storage drivers in the WIM file. From the Selection profile drop-down list, choose the selection profile that you created
Why need to Update Deployment Share
Generally, you need to update the deployment share any time you make changes that affect the boot image.That would include:
- Added a driver that need to be injected in WinPE.
- Modified the boot image settings.
- Changes to the Bootstrap.ini file.
- Updated any of the scripts or files.
Update the deployment share, by right-clicking the MDT Build Lab deployment share and select Update Deployment Share. Use the default Options for the Update Deployment Share wizard.It will only inject drivers into WindowsPE from the folder that you specified in your selection profile
Split a Windows Image File (.wim)
We need to configure or validate this settings once before proceeding deployment with image having more than size of 4GB. As FAT32 is required to boot UEFI System that has maximum supported file size 4GB. After splitting the image into a set of smaller (.swm) files it can handle image having more than size of 4GB when installing windows image from USB or DVD.
In the Deployment share > Control > Settings.xml. Open with Notepad to modify.
Make Sure that the Settings.xml file has the following setting configured, Save and close the Notepad.
Important Tips! Before starting to update media content, it’s better to close all the opened instance of Deployment Share, path used by some other process. If needed sign out from logged in User Account, logged in to Server and Open Deployment Share> Advanced Configuration> Media> Update Media Content.
Right Click on Media and select Update Media Content.
Now the ISO Image creation will be in progress and it will take longer time to complete the process.
Once Media generation completed successfully, Click on Finish to close the wizard.
Media has been created successfully, you can see the ISO files to use for deployment has created under path you specified.
Depending on your target devices, create a bootable USB from the ISO for offline deployment.