About
OSDeploy integrates with MDT through two public functions:
Install-OSDeployMDTinitializes an existing MDT Deployment Share one time.Invoke-OSDeployMDTruns as the LiteTouchPE exit script during every Update Deployment Share operation.
Requirements
PowerShell 7+ on the MDT host
MDT installed on the same machine
Windows ADK installed for WinPE customization and ISO patching
Administrator rights
Installation
Install the OSDeploy module from the PowerShell Gallery:
Install-Module -Name OSDeploy -Force -SkipPublisherCheckFunctions
Install-OSDeployMDT
Initializes an MDT Deployment Share for use with OSDeploy and configures it so that Invoke-OSDeployMDT runs automatically on every Update Deployment Share.
Without -Force, the function runs in audit mode and reports the current state without changing anything.
With -Force, it performs the following work:
Resolves the MDT installation directory and active deployment share
Creates
Templates\,Templates\winpe-drivers\, andTemplates\winpe-extrafiles\Copies
winpeshl.ini,Wimscript.ini,Unattend_PE_x64.xml, andLiteTouchPE.xmlCopies
Background.bmptoTemplates\background.bmpRewrites
%INSTALLDIR%references inLiteTouchPE.xmlto%DEPLOYROOT%Copies the WinPE
<Components>block fromBoot\LiteTouchPE_x64.xmlor writes a default setRegisters
Invoke-OSDeployMDTas the LiteTouchPE exit commandUpdates
Control\Settings.xmlto disable x86 boot image generation and set scratch space to 512 MB
See powershell-modules/osdeploy/Install-OSDeployMDT.md for the full function reference.
Invoke-OSDeployMDT
MDT LiteTouchPE exit script that customizes the WinPE image during Update Deployment Share.
At the WIM stage it:
Collects EFI boot files and ADK
oscdimgbinaries intoBoot\bootbins\Copies
oa3tool.exeinto WinPESystem32Applies DISM locale and time-zone settings
Adds
PackageManagementandPowerShellGetto WinPEAdds
AzCopy,curl, and7-Ziptools to WinPESystem32Saves the
OSDCloudmodule into the mounted WinPE imageInjects WinPE drivers from
Templates\winpe-drivers\and, when available, the OSDeployCore driver library
At the POSTISO stage it:
Patches the exported ISO with
bootmgfw_EX.efifor UEFI CA 2023 Secure Boot compatibility
-SetInputLocale
String
Sets the default WinPE input locale. Default: en-us.
-SetTimeZone
String
Sets the WinPE time zone. Default: current system time zone.
See powershell-modules/osdeploy/Invoke-OSDeployMDT.md for the full function reference.
Typical Workflow
Last updated
Was this helpful?

