Introduction to Microsoft Deployment Toolkit

Microsoft Deployment Toolkit (MDT) is a free Microsoft tool that simplifies and automates the deployment of Windows operating systems. While WDS handles PXE-based image distribution, MDT provides a comprehensive task sequence engine that automates every step of an OS deployment including partitioning disks, applying OS images, installing drivers, installing applications, and joining domains. MDT works with WDS to serve MDT Lite Touch boot images over PXE or can be used standalone with boot USB drives. MDT 8456 supports deployment of Windows Server 2019 and integrates tightly with the Windows ADK. It is the tool of choice for organizations that need consistent, automated deployments without the complexity and cost of SCCM.

Prerequisites

Before installing MDT, prepare the deployment server. Install Windows Server 2019 or Windows 10/11 as the MDT workbench machine. Download and install the Windows Assessment and Deployment Kit (ADK) for Windows 10 version 2004 or later, which is compatible with MDT 8456. Also install the Windows PE add-on for the ADK. Download MDT 8456 from the Microsoft Download Center. The MDT server should have at least 100 GB of free disk space for the Deployment Share and should be accessible on the network by client machines.

winget install Microsoft.ADK
winget install Microsoft.ADKPEAddOn
# Download MDT manually from Microsoft Download Center and install:
msiexec /i MicrosoftDeploymentToolkit_x64.msi /quiet /norestart

Creating the Deployment Share

The Deployment Share is the central repository for all MDT content including OS images, applications, drivers, and scripts. Open the Deployment Workbench from the Start menu. Right-click Deployment Shares and select New Deployment Share. Specify the path for the share such as D:DeploymentShare and a share name such as DeploymentShare$. The dollar sign makes the share hidden. Accept the default descriptions and complete the wizard. Using PowerShell with the MDT PowerShell module:

Import-Module "C:Program FilesMicrosoft Deployment ToolkitbinMicrosoftDeploymentToolkit.psd1"
New-PSDrive -Name "DS001" -PSProvider MDTProvider -Root "D:DeploymentShare" -Description "MDT Deployment Share" -NetworkPath "\MDT01DeploymentShare$" -Verbose | Add-MDTPersistentDrive -Verbose

Importing the Operating System

Import Windows Server 2019 installation files into the Deployment Share. In Deployment Workbench, expand your deployment share, right-click Operating Systems, and select Import Operating System. Choose Full set of source files and browse to the root of the Windows Server 2019 installation media or mounted ISO. MDT copies all files to the OS store directory in the deployment share. Using PowerShell:

$sourcePath = "E:"
Import-MDTOperatingSystem -Path "DS001:Operating Systems" -SourcePath $sourcePath -DestinationFolder "Windows Server 2019" -Verbose

Verify the OS was imported:

Get-Item "DS001:Operating Systems*" | Select-Object Name

Adding Applications

MDT can install applications automatically during deployment. Import applications into the Deployment Share. In Deployment Workbench, right-click Applications and select New Application. Choose Application with source files for applications that need to be distributed, or Application without source files for applications installed from a network share. Provide the name, working directory, and silent install command line. For example, to add 7-Zip:

Import-MDTApplication -Path "DS001:Applications" -Enable "True" -Name "7-Zip 22.01 x64" -ShortName "7-Zip" -CommandLine "7z2201-x64.exe /S" -WorkingDirectory ".Applications7-Zip 22.01 x64" -ApplicationSourcePath "C:Software7-Zip" -DestinationFolder "7-Zip 22.01 x64" -Verbose

Importing Device Drivers

MDT can inject drivers into the deployed OS automatically. Organize drivers by manufacturer and model in folders. Import them into the Out-of-Box Drivers section. Create selection profiles to deploy specific drivers only to specific models. In Deployment Workbench, right-click Out-of-Box Drivers and select Import Drivers. Browse to the folder containing extracted drivers (INF files). Using PowerShell:

Import-MDTDriver -Path "DS001:Out-of-Box DriversDellPowerEdge R740" -SourcePath "C:DriversDellR740" -Verbose

Create a selection profile for model-specific driver injection:

New-Item -Path "DS001:Selection Profiles" -Enable "True" -Name "Dell PowerEdge R740 Drivers" -Comments "Drivers for Dell PowerEdge R740" -Definition "" -Verbose

Creating a Task Sequence

Task sequences define the automated steps MDT performs during deployment. In Deployment Workbench, right-click Task Sequences and select New Task Sequence. Provide an ID such as WS2019-001, a name such as Deploy Windows Server 2019, and select the Standard Server Task Sequence template. Select the Windows Server 2019 OS you imported. Specify the product key if needed or leave blank for KMS activation. Provide the local administrator password that will be set during deployment.

After creation, edit the task sequence to customize steps. Common customizations include adding application install steps, configuring disk partitioning for different hardware, adding domain join credentials, and configuring timezone and regional settings.

New-MDTTaskSequence -Path "DS001:Task Sequences" -Name "Deploy Windows Server 2019" -Template "StandardServer.xml" -Comments "Standard WS2019 Deployment" -ID "WS2019-001" -Version "1.0" -OperatingSystemPath "DS001:Operating SystemsWindows Server 2019Windows Server 2019 SERVERSTANDARD in Windows Server 2019 install.wim" -FullName "Administrator" -OrgName "Contoso" -HomePage "about:blank" -AdminPassword "P@ssw0rd123!" -Verbose

Configuring the Bootstrap.ini and CustomSettings.ini

Bootstrap.ini controls what happens when the MDT WinPE boots, including how to connect to the deployment share. CustomSettings.ini controls all deployment settings and can automate every deployment prompt. Edit these files in Deployment Workbench under the deployment share Properties. Example Bootstrap.ini for automatic connection to the share:

[Settings]
Priority=Default

[Default]
DeployRoot=\MDT01DeploymentShare$
UserDomain=CONTOSO
UserID=MDT-Deploy
UserPassword=MDT@Service123!
SkipBDDWelcome=YES

Example CustomSettings.ini to fully automate server deployments:

[Settings]
Priority=Default
Properties=MyCustomProperty

[Default]
OSInstall=Y
SkipCapture=YES
SkipAdminPassword=YES
SkipProductKey=YES
SkipComputerBackup=YES
SkipBitLocker=YES
SkipLocaleSelection=YES
TimeZoneName=Central Standard Time
JoinDomain=contoso.com
DomainAdmin=MDT-DomainJoin
DomainAdminDomain=CONTOSO
DomainAdminPassword=DomainJoin@123!
MachineObjectOU=OU=Servers,DC=contoso,DC=com
SkipDomainMembership=YES
SkipFinalSummary=YES
FinishAction=REBOOT

Updating the Deployment Share

After adding content and configuring settings, update the deployment share to generate the WinPE boot images. In Deployment Workbench, right-click the deployment share and select Update Deployment Share. Accept defaults unless you need to customize the WinPE. Using PowerShell:

Update-MDTDeploymentShare -Path "DS001:" -Force -Verbose

The update process generates LiteTouchPE_x64.iso and LiteTouchPE_x64.wim in the Boot folder of the deployment share. Import the WIM to WDS as a boot image:

Import-WdsBootImage -Path "D:DeploymentShareBootLiteTouchPE_x64.wim" -NewImageName "MDT LiteTouch WS2019" -SkipVerify

Monitoring Deployments

Enable MDT monitoring to track deployment progress in real time. In Deployment Workbench, right-click the deployment share and select Properties, then the Monitoring tab. Enable monitoring and note the monitoring port (default 9800). Using PowerShell to view active deployments:

Get-MDTMonitorData -Path DS001: | Select-Object Name, PercentComplete, CurrentStep, StepName, LastTime, Messages | Format-Table -AutoSize

MDT logs all deployment activity to SMSTS.log in C:MININTSMSOSDOSDLOGS during WinPE and C:WindowsTempDeploymentLogs after Windows boots. These logs are invaluable for troubleshooting failed deployments.