Microsoft Deployment Toolkit 8450 Automatic Setup v3.2

Warning: This script is intended to run on a clean Windows installation which doesn’t have MDT/ADK installed/configured already. Unexpected results will arise when running on already configured deployment servers.

Date Updated: 01/07/2018 (v3.2)

I frequently setup new MDT environments for testing purposes, so I decided to create a PowerShell script which will do the work for me!

It completes the following steps:

1) Download MDT (8450) & ADK (1803)
2) Silently install MDT & ADK (with Deployment Tools & WindowsPE)
3) Creates a local user with the account name “svc_mdt” (for Read-Only DeploymentShare access)
4) Creates a new Deployment Share
5) Imports all WIM files placed in the script folder
6) Creates a standard client task sequence for each WIM image found
7) Edits bootstrap.ini with the Deployment Share access information
8) Creates Boot media
9) OPTIONAL – Imports Office 365 2016 Monthly build without old OneDrive client (groove.exe)
10) OPTIONAL – Imports the following 64bit applications into MDT (latest versions as of 24/06/2018):
– Google Chrome Enterprise
– Mozilla Firefox
– 7-Zip
– Visual Studio Code
– Node.js
– MongoDB Community
– VLC Media Player
– Adobe Reader DC

Once complete you will have a deployment share ready to use. I have tested this script on a Windows 10 VM.

How to use:
1) Get the script here and save it as mdt8450auto.ps1
2) OPTIONAL – add your desired WIM file that you wish to auto import in the same folder where the script resides
3) Open CMD as an administrator, change directory to same folder the script resides in and run the below command:

powershell -executionPolicy bypass -file mdt8450auto.ps1

If you want to include Office 365 2016, specify the -office365 switch.

If you want to include applications, specify the -applications switch:

powershell -executionPolicy bypass -file mdt8450auto.ps1 -office365 -applications

5) You will be asked to enter the following information:
ServiceAccountPassword – This is the password for the local service account that gets created when the script runs
DeploymentShareDrive – This is to select which drive you want the deployment share to exist on, i.e. c:\

Here is the full code below:

Version 3.2 updates:
*Added functionality for multiple WIM images to be imported

Version 3 updates:
*Added pre-defined applications that can be imported into MDT with the -applications switch
*Removed need for PSini
*Cleaner code
*Option to select where you want the deployment share to exist
*Changed ADK to latest version (1803)

Version 2 Updates:
*Added option to import Office 365 2016 Monthly release without old OneDrive client (groove.exe) via -office365 switch
*Changed file download method to BITS (faster than Invoke-WebRequest)
*Added script parameters for service/local user account passwords
*Added Boot media generation
*Download PSIni from PowerShell Gallery

3 Replies to “Microsoft Deployment Toolkit 8450 Automatic Setup v3.2”

  1. Great script!

    Some quick suggestions.

    1. Set the Windows PE driver selection profiles to “Nothing”, this is the best practice when initiating a new setup.
    2. Create sub-folders for the Applications using the Vendor name, Adobe, Microsoft, Java, etc.
    3. Add a feature to install the WDS role and import the boot wim after the initial Update Deployment share.
    4. Use chocolately for installing mdt/winadk, this will ensure the versions are always the latest, instead of using hard links.


Leave a Reply

Your email address will not be published. Required fields are marked *