Microsoft Deployment Toolkit 8450 Automatic Setup

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.

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 (1709)
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 a single WIM file placed in the script folder (currently only supports 1 WIM file)
6) Creates a standard client task sequence if a WIM is 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)

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

How to use:
1) Download the script here
2) Extract
3) OPTIONAL – add your desired WIM file that you wish to Auto import in the same folder where the script resides
4) 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:

powershell -executionPolicy bypass -file mdt8450auto.ps1 -office365

5) You will be asked to enter 2 passwords:
serviceAccPw – This is the password for the local service account
adminPw – This is the password for the initial task sequence creation

Here is the full code below:

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

Thanks to
PowerShell is King – Building a Reference Image Factory (v 3.2)
PSIni PowerShell Module
(for showing how to edit ini files)

Leave a Reply

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