For the complete documentation index, see llms.txt. This page is also available as Markdown.

About

PowerShell module for automating MDT (Microsoft Deployment Toolkit) deployments with OSDCloud support.

Author

David Segura

Company

Recast Software

License

See LICENSE

PS Editions

Core (7+), Desktop (5.1)

Min PS Version

5.1


Requirements

  • PowerShell 7+ — required for Enable-OSDeployMDT and Build-OSDeployMDT

  • Windows PowerShell 5.1 — loads MDT cmdlet helpers only; no public functions exported

  • Windows ADK installed (for Build-OSDeployMDT WinPE customization)

  • MDT installed (for MDT cmdlet support in PS5.1)


Installation

Install-Module -Name OSDeployMDT

From Source


Functions

Enable-OSDeployMDT

One-time initialization of an MDT Deployment Share for OSDCloud integration. Run this once after creating a new deployment share, before the first Update Deployment Share.

  • Creates Templates\, Templates\winpe-driver\, and Templates\winpe-extrafiles\ folders

  • Copies LiteTouchPE.xml, winpeshl.ini, wimscript.ini, Unattend_PE_x64.xml from INSTALLDIR\Templates

  • Copies Background.bmp wallpaper from INSTALLDIR\Samples (replaceable)

  • Rewrites %INSTALLDIR% path references in LiteTouchPE.xml to %DEPLOYROOT%

  • Syncs WinPE <Components> from Boot\LiteTouchPE_x64.xml (or writes a default set)

  • Registers Build-OSDeployMDT as a LiteTouchPE exit so it runs on every Update Deployment Share

  • Updates Control\Settings.xml: disables x86 boot image, sets scratch space to 512 MB, sets paths

Requires Administrator rights. See docs/Enable-OSDeployMDT.md for full details.


Build-OSDeployMDT

MDT LiteTouchPE exit script — runs automatically during Update Deployment Share. Requires PowerShell 7+.

WIM stage — customizes the mounted WinPE image:

  • Collects EFI boot files and ADK oscdimg binaries into DEPLOYROOT\Boot\bootbins\

  • Copies oa3tool.exe (OEM Activation 3.0) into WinPE System32

  • Applies DISM locale and time-zone settings

  • Adds PackageManagement and PowerShellGet modules (enables PowerShell Gallery in WinPE)

  • Adds AzCopy, curl, and 7-Zip to System32

  • Saves the OSDCloud module into the WinPE image

  • Injects WinPE drivers from DEPLOYROOT\Templates\winpe-driver\ (automatic) and optionally from the OSDeployCore library (interactive picker)

POSTISO stage — builds a patched ISO with bootmgfw_EX.efi for UEFI CA 2023 Secure Boot compliance.

Parameter
Type
Description

-SetAllIntl

String

IETF locale tag for all International settings. Default: en-us.

-SetInputLocale

String

Default keyboard input locale. Default: en-us.

-SetTimeZone

String

WinPE time zone name (validated against tzutil /l). Default: current system time zone.

See docs/Build-OSDeployMDT.md for full details.


Typical Workflow


Project Structure


Running Tests

Pester v5 is required.


Contributing

  1. Fork the repository and create a feature branch.

  2. Add or update the relevant function in OSDeployMDT\Public\ or OSDeployMDT\Private\.

  3. Add a corresponding *.Tests.ps1 file under tests\.

  4. Update FunctionsToExport in OSDeployMDT.psd1 for any new public functions.

  5. Bump ModuleVersion in OSDeployMDT.psd1 following Semantic Versioning.

  6. Add an entry to CHANGELOG.md.

  7. Open a Pull Request.

Last updated

Was this helpful?