How friendsofmdt/psd works
1. What this repository is
- This is a PowerShell-based extension kit for Microsoft Deployment Toolkit–style operating system deployment.
- It is not a conventional application repo; it is a bundle of deployment content, scripts, templates, wizard UI, and server-setup helpers that together form a deployment platform.
2. Primary architectural layers
- Authoring/configuration layer: INI files, XML definitions, task-sequence templates, and deployment-share metadata.
- Runtime deployment layer: PowerShell scripts executed in WinPE and later in the target OS during imaging.
- User interaction layer: the prestart and wizard UI used to gather deployment choices before task sequence execution.
- Infrastructure layer: IIS/HTTPS, BranchCache/BITS, certificates, and optional REST/web instance support.
3. Repository bootstrap and install path
- Install-PSD.ps1 is the top-level installer/bootstrap entry point.
- It appears to lay down the PSD framework, provision folders, and wire the deployment share structure expected by the rest of the toolkit.
- The repo’s Tools/ scripts support server-side setup and instance configuration around that bootstrap.
4. Deployment execution flow
- The runtime flow is centered in Scripts/PSDStart.ps1, Scripts/PSDPrestart.ps1, and the ZTI*.xml/PSD*.ps1 scripts.
- The process typically begins in prestart, collects environment and user choices, then transitions into gathering, validation, partitioning, application/driver selection, OS application, and finalization.
- This is a staged pipeline rather than a single monolithic installer.
5. Core task-sequence style subsystems
- PSDGather, PSDValidate, PSDPartition, PSDDrivers, PSDApplications, PSDApplyOS, PSDFinal, and related scripts map to major deployment phases.
- PSDConfigure, PSDSetVariable, PSDUpdateDisk, PSDTattoo, and PSDWindowsUpdate handle configuration, state application, disk prep, and post-deploy maintenance.
- These are the main “functional blocks” you’d show as ordered phases in a diagram.
6. Shared utilities and state management
- PSDHelper.ps1, PSDUtility.psm1, PSDDeploymentShare.psm1, PSDGather.psm1, and PSDStartLoader.psm1 provide shared functions and orchestration support.
- PSDWizard.psm1 / PSDWizardNew.psm1 encapsulate wizard logic, while PSDWizard.xaml and the PSDWizardNew theme folders separate UI presentation from behavior.
- The design is modular: phase scripts call common utility modules rather than duplicating logic.
7. Prestart and endpoint-side UI
- PSDResources/Prestart/ contains the WinPE prestart XML and scripts that present the initial menu and bootstrap the deployment experience.
- This is the boundary between the boot environment and the actual deployment workflow.
- PSDResources/Readiness/ and PSDResources/UserExitScripts/ add hooks for prechecks and customer-specific customization.
8. Configuration and environment data
- INIFiles/Bootstrap.ini and INIFiles/CustomSettings.ini are the main configuration inputs that drive deployment behavior.
- Additional XML files provide structured metadata such as languages, time zones, platform support, BIOS checks, NIC settings, and server manager settings.
- These files act as the policy/configuration boundary separating environment-specific values from reusable deployment logic.
9. Templates and deployment-share shape
- Templates/ contains unattend and LiteTouch/PSD XML templates for x86/x64 and PE/full-OS phases.
- These templates define how the target machine is prepared, what answer-file settings are applied, and how the deployment workflow is initialized.
- For architecture purposes, this is the “output shape” consumed by MDT-like deployment shares and WinPE boot media.
10. Wizard subsystem
- There are two wizard generations: legacy Scripts/PSDWizard.* and newer Scripts/PSDWizardNew/.
- The newer wizard is theme-driven, with separate resource XAML files and localized pane definitions for device details, locale, readiness, applications, task sequence, target disk, and related choices.
- Its role is to collect deployment-time inputs and feed them into the variable/configuration pipeline.
11. Server provisioning and content delivery
- Tools/New-PSDWebInstance.ps1, Tools/Set-PSDWebInstance.ps1, Tools/New-PSDRestPS.ps1, and certificate scripts define the server-side hosting model.
- The repository explicitly supports IIS over HTTPS for content delivery, and optionally BITS + BranchCache via 2Pint OSD Toolkit.
- This is a significant architectural boundary: deployment content is fetched over network services rather than embedded locally.
12. Plugins and extensibility
- Plugins/OSDToolkit/Set-PSDBootImage2PintEnabled.ps1 shows integration with 2Pint tooling and boot image enablement.
- The plugin model suggests PSD can be extended for alternate delivery or boot-image behaviors without changing the core scripts.
- The repo also includes user-exit script hooks to allow custom actions at specific deployment points.
13. Logging, validation, and operational support
- Scripts such as PSDCopyLogs.ps1, PSDTest.ps1, PSDValidate.ps1, and Set-PSDLogInstance.ps1 support diagnostics and operational hardening.
- Logging is an explicit part of the architecture, including server-side upload support referenced in the README.
- These support scripts are the observability boundary for troubleshooting deployment runs.
14. How to think about the full system
- A useful diagram would show: boot/prestart in WinPE → wizard/config collection → validation/gathering → disk/driver/app/OS application → finalization/post-processing → logging back to server.
- Surrounding that runtime path are configuration files, templates, and server provisioning tools.
- The repository is therefore best understood as a deployment framework composed of content, orchestration scripts, and hosting/setup utilities rather than a single executable service.
Main entry points: PSDStart.ps1 Start Loader · New-PSDWebInstance.ps1 Web Instance · Install-PSD.ps1 Install PSD · PSDPrestartMenu.ps1 Prestart Menu
Components 28
Bootstrap
Installer and deployment-share initialization.
- Install PSD · Top-level installer that lays down the PSD framework and deployment-share structure.
Install-PSD.ps1
Runtime
WinPE-to-OS deployment pipeline and shared orchestration.
- Prestart · Initial WinPE handoff that starts the deployment experience and collects early choices.
Scripts/PSDPrestart.ps1 - Start Loader · Main runtime loader that coordinates the staged deployment flow.
Scripts/PSDStart.ps1 - Gather · Collects environment data and deployment variables.
Scripts/PSDGather.ps1 - Validate · Checks readiness and deployment constraints before imaging continues.
Scripts/PSDValidate.ps1 - Partition · Prepares target disks and partitions for deployment.
Scripts/PSDPartition.ps1 - Drivers · Selects or injects driver content for the target machine.
Scripts/PSDDrivers.ps1 - Applications · Stages application selection and installation.
Scripts/PSDApplications.ps1 - Apply OS · Applies the operating system image to the target device.
Scripts/PSDApplyOS.ps1 - Finalization · Performs post-deployment wrap-up and cleanup.
Scripts/PSDFinal.ps1 - Configure · Applies deployment configuration and environment-specific settings.
Scripts/PSDConfigure.ps1 - Set Variables · Writes deployment variables into the runtime state.
Scripts/PSDSetVariable.ps1 - Tattoo · Persists selected machine state into the target OS.
Scripts/PSDTattoo.ps1 - Update Disk · Adjusts disk layout or metadata during deployment.
Scripts/PSDUpdateDisk.ps1 - Windows Update · Runs post-deploy update handling.
Scripts/PSDWindowsUpdate.ps1
Wizard UI
Interactive deployment input and theme-driven UI.
- Legacy Wizard · Older wizard implementation used to gather deployment inputs.
Scripts/PSDWizard.psm1 - New Wizard · Theme-driven wizard implementation with pane-based deployment UX.
Scripts/PSDWizardNew.psm1 - Wizard Layout · Shared XAML shell for the legacy wizard UI.
Scripts/PSDWizard.xaml - Prestart Menu · WinPE menu and bootstrap scripts that open the deployment flow.
PSDResources/Prestart/PSDPrestartMenu.ps1
Config
INI, XML, and templates that shape deployment behavior.
- Bootstrap INI · Core bootstrap configuration for deployment initialization.
INIFiles/Bootstrap.ini - Custom Settings · Primary deployment-share settings and policy inputs.
INIFiles/CustomSettings.ini - Templates · Unattend and LiteTouch/PSD templates for PE and full-OS phases.
Templates/LiteTouchPE.xml - Share Metadata · Shared definitions for deployment share behavior and platform metadata.
Scripts/PSDDeploymentShare.psm1
Infrastructure
Server hosting, certificates, and delivery support.
- Web Instance · Creates and configures IIS-backed PSD web hosting.
Tools/New-PSDWebInstance.ps1 - RestPS · Provisioning for the optional REST endpoint integration.
Tools/New-PSDRestPS.ps1 - Certs · Creates server and root CA certificates used for HTTPS delivery.
Tools/New-PSDServerCert.ps1 - Log Instance · Configures centralized logging support for deployment operations.
Tools/Set-PSDLogInstance.ps1
Extensions
Optional plugin integrations and hooks.
- 2Pint Plugin · Optional boot-image and BranchCache/BITS integration for OSD Toolkit.
Plugins/OSDToolkit/Set-PSDBootImage2PintEnabled.ps1
Connections 30
- Install PSD → Bootstrap INI: reads · Installer uses bootstrap settings to provision the framework.
- Install PSD → Templates: lays out · Installer places the deployment templates and share shape.
- Install PSD → Prestart: enables · Bootstrap prepares the WinPE prestart entrypoint.
- Prestart → Prestart Menu: launches · WinPE prestart presents the initial menu and startup scripts.
- Prestart Menu → Legacy Wizard: opens · Legacy UI gathers deployment choices.
- Prestart Menu → New Wizard: opens · New theme-driven UI gathers deployment choices.
- Legacy Wizard → Custom Settings: writes vars · Wizard feeds collected choices into deployment settings.
- New Wizard → Custom Settings: writes vars · Wizard feeds collected choices into deployment settings.
- Custom Settings → Start Loader: drives · Deployment settings steer the runtime orchestrator.
- Start Loader → Gather: runs · Execution begins with environment and variable gathering.
- Gather → Validate: runs · Collected state is validated before imaging continues.
- Validate → Partition: runs · Validated deployment proceeds to disk preparation.
- Partition → Drivers: runs · Disk prep is followed by driver selection/injection.
- Drivers → Applications: runs · Driver stage hands off to application staging.
- Applications → Apply OS: runs · Application selection precedes OS application.
- Apply OS → Configure: runs · OS application transitions into configuration.
- Configure → Set Variables: runs · Configuration writes runtime variables and state.
- Set Variables → Update Disk: runs · Variable/state application can trigger disk updates.
- Update Disk → Tattoo: runs · Disk updates precede state persistence into the OS.
- Tattoo → Windows Update: runs · Persisted state is followed by post-deploy updates.
- Windows Update → Finalization: runs · Update handling concludes with finalization.
- Start Loader → Share Metadata: loads · Runtime orchestration uses shared deployment-share helpers.
- Start Loader → Legacy Wizard: uses · Core runtime can invoke the legacy wizard module.
- Start Loader → New Wizard: uses · Core runtime can invoke the newer wizard module.
- Start Loader → Log Instance: emits · Deployment flow records operational logs.
- Web Instance → Certs: depends on · HTTPS web hosting requires certificates.
- Web Instance → RestPS: pairs with · Web hosting can be paired with optional REST support.
- Web Instance → Log Instance: configures · Server-side hosting is tied to logging instance setup.
- 2Pint Plugin → Web Instance: extends · Plugin integration extends delivery and boot-image behavior.
- 2Pint Plugin → Start Loader: feeds · Extension can influence runtime boot/deployment behavior.