Building A Windows 10 1803 (April 2018 Update) Reference Image with MDT


This post will walk through installing and configuring Microsoft Deployment Toolkit to build a reference image of Windows 10 1803 (April 2018 Update) using a Hyper-V Virtual Machine. It is assumed that you have a Server or PC ready to install MDT onto and create an file share for MDT to build the image with.

Here are the links to the software we’ll be using:

Additional software which may be useful to you:


Installing Microsoft Deployment Toolkit and Dependencies

  1. First we’ll install the Windows 10 1803 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
  • Windows Preinstallation Environment (Windows PE)
  • Imaging And Configuration Designer (ICD)
  • Configuration Designer
  • User State Migration Tool (USMT)
  1. Now install MDT by running the setup file downloaded earlier. There is no specific configuration during the install wizard.


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 10 1803 ISO in File Explorer.
  2. Go to Deployment WorkbenchOperating Systems.
  3. Right click and select New Folder.
  4. Enter the name Windows 10 1803 x64 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 10 1803 x64 and complete the wizard.
  8. Go to the Operating Systems/Windows 10 1803 x64 node and rename the new entries added to Windows 10 1803<Edition>x64 for ease of use.


Creating Package Folder For Future Updates

  1. Go to Deployment Workbench > Packages.
  2. Create a folder named Windows 10 1803 x64.

Now we’ll create a selection profile so that the Task Sequence only attempts to install the updates for Windows 10 1803 x64.


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 10 1803 x64.
  4. On the Folders page, tick the Windows 10 1803 x64 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 Microsoft Office. MDT recognises Microsoft Office and provides automated/silent install options.

  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: Microsoft Office.
  5. Enter the Source directory of the installation files.
  6. Enter the Destination directory: Microsoft Office.
  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 Microsoft Office, go to the Office Products Tab.
  2. Choose the desired Office Product to Install from the drop down menu.
  3. Check the desired Office language.
  4. Enter a product key, unless you will be activating Office via KMS in which case leave the Product Key option unchecked.
  5. Check the Customer name option and enter the desired information.
  6. Check the Display level option and select None in the drop down menu.
  7. Check the Accept EULA option.
  8. Check the Always suppress reboot option.
  9. Click Apply.
  10. Go to the Details tab and the Quiet install command should now read:
    setup.exe /config proplus.ww\config.xml

Microsoft Office is now set up to be installed silently by a Task Sequence. If you wish to customise the installation to a greater degree, the Office Customization Tool can be launched from the Office Products tab. This process can also be done for Microsoft Visio and Project.

To add other popular third party software, you’ll need to repeat the steps above, with the relevant Command line to quietly or silently install them.

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: W10-1803.
  4. Name it Build Windows 10 1803.
  5. Select Standard Client Task Sequence.
  6. Select the Operating System Windows 10 1803 x64.
  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 OS Info tab and click Edit Unattend.xml. It will take sometime to generate the catalog.
  3. When the Unattend.xml opens, go to 7 oobesystemamd64_Microsoft-Windows-Shell-Setup__neutral > OOBE.
  4. Change the ProtectYourPC setting to 3. This will prevent the image from randomly checking for updates whilst it is being built.
  5. Save the Unattend.xml, you can safely ignore an warnings.
  6. Go to the Task Sequence tab on the Properties window of the Task Sequence.
  7. Expand the Preinstall folder, and select the Apply Patches item.
  8. Change the Selection Profile to Windows 10 1803 x64.
  9. Go to the State Restore folder and select Windows Update (Pre-Application Installation).
  10. On the right side of the Properties window, go to the Options tab.
  11. Uncheck the Disable this step tick box and do the same with Windows Update (Post-Application Installation).
  12. If you skipped the Importing Applications section, please disable the Install Applications item and go to step 16, if not please continue.
  13. Go to the Install Applications item.
  14. In the right side of the Properties box, select the Install a single application option and click the Browse… button.
  15. Select Microsoft Office and change the name Install Applications to Microsoft Office.
  16. Install other Applications, copy and paste the Install Applications item and repeat steps 13 – 15 for the applications of your choice.
  17. Click Apply and close the Task Sequence.


Blocking Internet Access to prevent Microsoft Store App Updates

To block internet access to the VM whilst the image is building, we’ll use the script from Peter Löfgren’s System Center Ramblings post.

  1. First create a PowerShell script file called Internet-Access.ps1 with the following code:
## Creates the disable option used by the script
param (

## If the Disable command line option is not added, the script adds a Firewall Rule to block traffic on ports 80 (http) and 443 (https).
If (!$Disable)
   Write-Output "Adding internet block"
   New-NetFirewallRule -DisplayName "Block Outgoing 80, 443" -Enabled True -Direction Outbound -Profile Any -Action Block -Protocol TCP -RemotePort 80,443

## If the Disable command line option is added, the script removes the Firewall Rule created above.
If ($Disable)
   Write-Output "Removing internet block"
   Get-NetFirewallRule -DisplayName "Block Outgoing 80, 443" | Remove-NetFirewallRule
  1. Save the script in your MDT share, where the Task Sequence will be able to access it. I save my custom scripts in a folder called _scripts the Applications folder.
  2. In the Task Sequence created above, we’ll add the items required to run the PowerShell script to enable and disable the internet blocking firewall rules.
  • Go to the Task Sequence tab on the Properties window of the Task Sequence.
  • Go to State Restore and click on the Add button.
  • Go to General > Run PowerShell Script.
  • Name the new item PS Script – Disable Internet Access.
  • Enter Z:\Applications\_scripts\Internet-Access.ps1 or your own path to the PowerShell script we just created.
  • Scroll down the Task Sequence to just above the Imaging folder.
  • Once again, add a new Run PowerShell Script item.
  • Name it PS Script – Enable Internet Access.
  • Again, enter Z:\Applications\_scripts\Internet-Access.ps1 or or your own path to the PowerShell script.
  • Important: Add -Disable to the Parameters section.
  • Click Apply and OK to close the Task Sequence.

What will happen now is that after Windows boots up, a firewall rule will be added to block internet traffic on ports 80 and 443, and just before starting the SysPrep and capture process the firewall rule will be removed.

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


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



Configuring CustomSettings.ini

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



BackupFile=%TaskSequenceID%_#year(date) & "-" & month(date) & "-" & day(date) & "-" & hour(time) & "-" & minute(time)#.wim

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 located 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:

  • 2x vCPUs
  • 4GB of RAM
  • Network Adapter with access the local network.
  • Virtual Hard Drive of at least 40GB, preferably on an SSD.
  • Boot from CD using the LiteTouchPE_x64.iso from MDT.
  • If using Hyper-V on Windows 10 1709 and above, 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 10 1803, update from the WSUS server, install the optional applications if you added them, and then run Windows Update from the WSUS server again. It will then run SysPrep and the reboot back into the deployment environment and MDT will capture the image.

When this process completes the VM will be shutdown and a file named W10-1803_YEAR_MONTH_DAY_HOUR_MINUTE.wim will be in the Captures folder in the Deployment Share.


You now have a reference image for Windows 10 1803 and an Microsoft Deployment Toolkit installation, with a deployment share specifically configured for building reference images.


Twitter – @Digressive

17 Comments Add yours

  1. Lukas says:

    Awesome writeup thanks. I successfully followed your previous post about building and deploying Windows 10 1709 images. In recent two articles about building and deploying of WIndows 10 1803 images I noticed, you are now creating TWO shares in MDT – Build and Deploy one. In previous article there was only one deployment share, which hosted both reference and captured image. Can you please elaborate on this, what are (dis)advantages of both solutions? I guess I dont have to select boot option now, since we have two different Lighttouch boot images? Thanks.


    1. Mike Galvin says:

      Hi Lukas,

      I’ve been running 2 shares for a while but haven’t written about it – I wasn’t sure it would be helpful for anyone.

      The downsides with having two shares are that: you have 2 shares to deal with, so it can be double the work in some cases but, at least in my case having each share focused on a single task helps a lot.

      The advantages are that: if you are responsible for building and testing, but not deploying images, then having a separate share to do that building and testing can be helpful. You don’t have to consider disrupting current deployments. Additionally, because the build share is only used for building, and all my building and testing is done on VMs, then drivers are not a consideration.

      With regards to having two litetouch boot images: the build share boot image is never used to PXE boot from. I only use the ISO to boot my own VMs.

      You could also consider this approach as “dev” and “live” deployment shares.

      As always I’m not saying this is the *only* way to do it, just *a* way to do it. It seems to work for me. Hope this helps. 🙂



  2. Lukas says:

    Thanks. I know there isn’t the only right way to do it, just as I am still learning I want to try something that has been already tried and proven good, so not to waste my time discovering what was discovered already. Now I have to teach other admins about MDT deployment and I was considering, whether show them to use one deployment share or two. I guess I would stick with one, to not confuse them too much. We are all responsible both for building and deploying, so everybody will be doing all tasks, so I think I can use only one deployment share.

    And do you know, if MDT is backwards compatible? I mean if I update MDT now for use with 1803, will it break my deployment share I have set up for 1709 images? Thanks.


    1. Mike Galvin says:

      No problem Lukas, I’m happy to offer advice.

      I would agree that one share is probably a good place to start to prevent confusion.

      I use MDT 8450 with Win 10 1709 and 1703 images still and it seems to be working, so you shouldn’t have any problems.


      Liked by 1 person

  3. Patrick Montmarquet says:

    Hi, Great guide ! The only problem I have is with the Internet-Access.ps1, The task fails telling me it was not abble to locate the file…


    1. Mike Galvin says:

      Hi Patrick,

      Be sure to have the Internet-Access.ps1 script in the deployment share somewhere and in the Task Sequence make sure the path is correct.

      Tip: If Z:\Applications\scripts doesn’t work, try %deployroot%\Applications\scripts.



  4. M.Hofmann says:

    Hey, i got the problem, that the autologon after the first reboot ist not working. Wenn i manually login, the ts goes on. Any suggestions?
    greetings Marcel


    1. Mike Galvin says:

      Hi there,

      I’ve only seen this problem with Win 10 1703, the issue wasn’t present in builds after this. I would recommend creating a new Task Sequence, making sure you on the latest build of MDT and the ADK.



      1. M.Hofmann says:

        Hey, thanks for the answer. That was what i found according to this problem. I saw that i used a old ADK Version and upgraded it to the ADK Win10 1803. Useing the same Deployment share after doesnt change anything. I will test to create a new deployment share. According to this, is it better to have different shares for client&server deployment, or doesnt it matter to use one share for client and server deployment at the same time?


      2. Mike Galvin says:

        Hi M, You can use one share, I just prefer to use two at least for larger networks.



  5. Nick says:

    Hi Mike, Thanks for your efforts to publish this! My question is what is the best practice to uninstall all Windows store apps?
    I `m trying to capture a custom.wim file from reference machine and if I run the script to clean all applications before to connect the system to the internet and install all applications I want then after captured the .wim the MDT deployment failed with the Error 5640. failed to install the Operating system, But if I capture the image with out to uninstall all Windows crap, it is working and I have to clean them after. Any suggestions on what TS we can uninstall all unnecessary apps?


    1. Mike Galvin says:

      Hi Nick,

      The best practice is probably not to touch them at all. Microsoft are pushing Store apps, previously known as UWP apps, not actively promoting ways to remove them. I would personally suggest to use whatever method works for you and your environment/way of working. I prefer to run a PowerShell script during the build task sequence (near the end) to remove the built in apps and then use the setting in Group Policy, under Cloud Content called “Turn off Microsoft consumer experience” which prevents the social media apps, games and so on from being downloaded when users log on. Contrary to popular belief Microsoft do not ship Windows with Twitter, Candy Crush, etc. pre-installed, it’s downloaded after setup along with other updates for Store apps, if the GPO option is not set.

      I’m assuming you’ve followed the blog post, but in case you haven’t – there’s a point in the Task Sequence where I block internet access – don’t worry, the block is lifted before sysprep. This block is put in place to prevent Windows from doing Store updates during application installs, which often causes SysPrep to fail.



  6. shibinshaji says:

    Hello Mike,
    Thanks for the post. I have got an error ‘Cannot find the script file “c:\ltibootstrap.vbs” ‘ and it didn’t finish capturing the image. I was trying it with a physical machine, not a VM. Any thoughts? Much appreciated. Thanks


    1. Mike Galvin says:

      Hi there,

      It sounds like there could be many things going wrong here. I’m sorry but without a lot more detailed information, I can’t give appropriate advice.



  7. Lukas says:

    I was trying to build a reference Hyper-V machine, all was ok, but during first phase, when OS is installed, I was presented with login screen, user Administrator and I had to manualy click Login, after that sequence continued and installed apps etc. Can this be automated so I would not have to login manually?


    1. Mike Galvin says:

      Hi Lukas,
      When creating a Task Sequence, you can specify an administrator password (even a blank one) which it uses to log in automatically. It shouldn’t be having an issue with logging in automatically, unless you are using Windows 10 1703 with no patches – as it was an issue then, but not with 1803, at least as far as I have seen.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.