Files
benoit 5a121718d4 Le log est désormais stocké dans %temp%
DeployCenter peut être stocké dans un partage en lecture seule
Désactivation de l'hibernation via l'unattend
Désactivation de la mise en veille lorsque le pc est sur secteur
L'installation unattend empêche bitlocker de s'activer (pas de clé stockée en lieu sûr hors domaine et azure en automatique). Cela n'empêche pas de l'activer en connaissance de cause par la suite.
2026-10-19 00:11:09 +02:00

14 KiB

DeployCenter

DeployCenter is a PowerShell tool for preparing and deploying Windows from Windows Preinstallation Environment (WinPE). It inventories the hardware, scans available Windows sources, lets the operator choose an edition and partition layout, then applies Windows and configures UEFI boot and the Windows Recovery Environment (WinRE).

The interface language follows the WinPE UI language (French or English). Themes, partitioning profiles, and Unattend profiles are loaded from data files to make customization easier.

Warning: installation completely erases the selected physical disk. Carefully verify the disk number, model, and capacity before confirming. Selecting the wrong disk will destroy its data.

Features

  • Hardware inventory and physical disk information.
  • Windows source discovery on configured paths, supporting ISO, WIM, and ESD images as well as extracted installation sources.
  • Selection of a Windows edition contained in an image.
  • UEFI/GPT partitioning profiles with WinRE before C:, with or without a D: partition.
  • INF driver installation matching the manufacturer, model/SKU, and Windows version.
  • Optional Windows answer file (Unattend) generation, including computer name and local account configuration.
  • UEFI configuration, winre.wim copy, and WinRE registration and enablement.
  • Deployment progress, logging, and a copy of the log to the root of C: after an installation attempt.
  • Interactive and command-line unattended deployment modes.

Requirements and files

DeployCenter is designed to run in WinPE with Windows PowerShell 5.1 and the Windows deployment tools it uses: DISM, DiskPart, mountvol, bcdboot, reagentc, Robocopy, and the Storage management cmdlets. Images, network shares, and drivers must be accessible from WinPE.

Keep the repository structure when copying it into the WinPE environment:

DeployCenter/
├── DeployCenter.ps1
├── DeployCenter.ini.example
├── HardwareInfo.ps1
├── Assets/
├── Locales/
├── Modules/
├── Partitioning/Profiles/
├── Themes/
└── Unattend/
    ├── Profiles/
    └── Templates/

The module, theme, profile, XML template, locale, and graphical asset folders are required for their respective features. The Drivers folder is normally placed alongside the DeployCenter folder.

Setup and first launch

  1. Copy DeployCenter.ini.example to DeployCenter.ini in the DeployCenter folder.
  2. Configure the source search paths and any required settings. The INI file is read at startup and is never modified by the application.
  3. Start WinPE, connect any required network shares, and open PowerShell in the DeployCenter folder.
  4. Run:
powershell.exe -ExecutionPolicy Bypass -File .\DeployCenter.ps1

To open the interface in a resizable window, for example for troubleshooting:

powershell.exe -ExecutionPolicy Bypass -File .\DeployCenter.ps1 -Windowed

To request local copies while keeping disk, image, and profile selection interactive:

powershell.exe -ExecutionPolicy Bypass -File .\DeployCenter.ps1 -CopyLocally Sources,Drivers

UltraVNC is disabled by default. The -Vnc option starts it at launch; DeployCenter then disables the WinPE firewall to allow VNC connections. Use this option only on a controlled deployment network: it disables the WinPE firewall as a whole.

To use -Vnc, extract tools/uvnc.zip into the parent folder of DeployCenter, so the uvnc folder sits alongside DeployCenter:

<parent folder>/
├── DeployCenter/
└── uvnc/

The supplied configuration encrypts the VNC connection with the SecureVNC plugin (UseDSMPlugin=1). The UltraVNC client must also enable this plugin and use SecureVNCPlugin64.dsm. To connect without encryption, disable the plugin on the client and set UseDSMPlugin=0 in uvnc/ultravnc.ini before starting DeployCenter.

UltraVNC client configured with the SecureVNC plugin enabled

Interactive deployment

DeployCenter main screen

  1. Review the hardware information and select the destination physical disk.
  2. Click Browse… to open Windows Sources. Separate paths to scan with semicolons; Search refreshes the results. You can filter the list, or double-click an image to choose an edition.

Windows Sources window showing detected images

  1. Select the required Windows edition. DeployCenter then searches for a driver pack matching the hardware and edition, if one is available.

Selecting a Windows edition from a WIM image

  1. Choose a partitioning profile. The default profile creates EFI, MSR, and WinRE before C:, which receives the remaining space. The C:/D: profile asks for the size of C: and assigns the remainder to D:.
  2. Choose a first-run profile. Use OOBE lets Windows handle the first-run experience without generating an Unattend file or asking for a computer name. The OEM installation profile configures the computer name and a local account using values from DeployCenter.ini.
  3. Click Install, review the confirmation details, and confirm only if the selected disk can be erased.
  4. Follow the deployment steps in the progress window. After a successful deployment, review the result and any WinRE size warning before confirming the restart.

Deployment progress

After a successful deployment, the duration of each step remains visible until the completion window is confirmed:

Deployment complete

Installation requires a compatible UEFI/GPT image containing Windows\System32\Recovery\winre.wim. The current engine does not provide an MBR/BIOS profile. If there is not enough space to copy winre.wim, deployment fails. Failure to meet Microsoft's WinRE size or free-space recommendations produces a warning. When this warning is present, automatic restart is not selected by default.

Windows sources

In DeployCenter.ini, the [Sources] section accepts multiple search roots separated by semicolons. %DEPLOY_VOLUME% refers to the drive hosting DeployCenter:

[Sources]
Paths=%DEPLOY_VOLUME%;Z:\

DeployCenter searches for ISO, WIM, and ESD files, as well as extracted source folders. An ISO is mounted read-only during analysis and deployment, then dismounted when the operation completes or is canceled.

By default, DISM uses the source paths directly. The -CopyLocally parameter requests a Robocopy copy to the Windows disk before processing, in both interactive and unattended modes: Sources for the Windows image, Drivers for the driver pack, or both. The Windows partition must have enough free space. If the parameter is omitted, these copies are skipped. Copying winre.wim to the recovery partition is still required in either mode.

Example completion screen when local copies were requested:

Deployment complete after locally copying the image and drivers

Drivers

By default, the driver pack root is Drivers alongside DeployCenter. Set [Drivers] RootPath in the INI file to use another location. Relative paths are resolved from the DeployCenter folder.

Organize driver packs as follows:

Drivers/
└── Lenovo/
    └── <model or SKU prefix>/
        └── Windows 11/
            ├── ...
            └── driver.inf

Recognized manufacturers are Lenovo, Dell, HP, and Microsoft. Recognized version folders include Windows 10, Windows 11, and Windows Server <year>. INF files may be in subfolders; DISM recursively adds them to the offline Windows image. The main screen displays the searched path and whether a matching pack was found.

DeployCenter.ini configuration

DeployCenter.ini.example documents all options and their default values. The main sections are:

  • [General] Theme: theme loaded from Themes/<name>.psd1 (Light by default).
  • [Sources] Paths: search roots separated by semicolons.
  • [Partitioning] WinRESizeMB: space reserved for WinRE in MB (1024 MB by default).
  • [Drivers] RootPath: custom driver root; leave empty to use the adjacent Drivers folder. The URL keys are manufacturer references.
  • [Unattend]: local account, encoded password, support information, and wallpaper.
  • [UltraVNC] Password: optional test password; when empty, a random password is generated.

Generate the password value for a local Unattend account with:

powershell.exe -ExecutionPolicy Bypass -File .\DeployCenter.ps1 -EncodeUnattendPassword

Enter the password at the hidden prompt, then put the resulting value in [Unattend] AdminPasswordBase64. This Base64 value is reversible and is not encryption; protect DeployCenter.ini accordingly. This setting is separate from [UltraVNC] Password, which is a test option.

The SupportProvider, SupportURL, and SupportAppURL keys are optional. SupportURL is a support website; SupportAppURL is the protocol for a support application. WallpaperPath accepts an absolute or DeployCenter-relative .png, .jpg, or .bmp path. When empty, the Windows wallpaper is left unchanged. These customizations apply when an Unattend profile is selected, not with Use OOBE.

The OEMInstallation Unattend profile asks Windows not to enable automatic BitLocker device encryption (PreventDeviceEncryption=true). It also disables hibernation and automatic sleep while on AC power; battery behavior is unchanged. Disabling hibernation also disables Fast Startup. These settings do not apply to Use OOBE, which keeps the default Windows behavior. A policy or manual action can still enable BitLocker later.

Unattended deployment

-NonInteractive starts deployment without asking for the choices on the first page. All required parameters must be provided, and -ConfirmDiskErase is mandatory. The progress window is still displayed.

Example: Windows 11 on disk 0, using the C:/D: partitioning profile and the OEM Unattend profile:

powershell.exe -ExecutionPolicy Bypass -File .\DeployCenter.ps1 `
  -NonInteractive -DiskNumber 0 `
  -ImagePath 'Y:\Windows11.iso' -EditionIndex 6 `
  -PartitionProfileId 'UEFI-GPT-WinRE-C-D' -CSizeGB 80 `
  -UnattendProfileId 'OEMInstallation' -HostName 'WS-001' `
  -ConfirmDiskErase -RestartWhenComplete `
  -CopyLocally Sources,Drivers

Required parameters:

  • -DiskNumber: number of the physical disk to erase.
  • -ImagePath: path to an ISO, WIM, ESD, or Windows source folder.
  • -EditionIndex: edition index in the image.
  • -PartitionProfileId: ID of a PSD1 profile in Partitioning/Profiles.
  • -UnattendProfileId: ID of a profile in Unattend/Profiles, or OOBE to skip applying an Unattend file.
  • -ConfirmDiskErase: explicit confirmation that the disk may be erased.

Conditional and optional parameters:

  • -HostName: required when the selected Unattend profile configures the computer name; it must meet the 15-character NetBIOS limit.
  • -CSizeGB: required by profiles that request a C: size; the C:/D: profile assigns the remainder to D:.
  • -RestartWhenComplete: requests a restart after success; WinRE capacity warnings cancel the restart request.
  • -CopyLocally Sources,Drivers: copies the Windows image and drivers locally. The accepted values are Sources and Drivers, separately or together. Without this parameter, DISM uses the source paths directly.

-CopyLocally can be used by itself with the interactive interface or together with -NonInteractive. Other command-line deployment parameters require -NonInteractive. To let Windows handle the first-run experience, use -UnattendProfileId OOBE and omit -HostName. The process returns 0 on success and 1 if preparation or deployment fails. After a deployment attempt, the log is also copied to the root of C:\.

Logs and troubleshooting

The Log button opens the session log. The file is created in %TEMP%\DeployCenter with the detected IPv4 address and a timestamp, so the DeployCenter repository can remain read-only. After a deployment attempt, a copy is placed at the root of C:\ so it remains accessible if the network share is no longer available. WinPE clears %TEMP% on restart.

If deployment fails:

  1. Note the final error message and the failed step in the progress window.
  2. Review the DeployCenter log and, if needed, the DISM/Windows Setup system logs on the target machine.
  3. Check network access to the sources, the edition index, free space on the target disk, and the expected INF files.
  4. After a partitioning failure, drive letters and partitions are retained where possible to aid diagnosis. Before retrying, verify the selected disk and its state.

DeployCenter messages follow the WinPE language. DISM, DiskPart, and other Windows tool output remains in the language used by those tools.

Modules and customization

  • DeployCenter.ps1: entry point, initialization, and UI orchestration.
  • Modules/UI.psm1: windows, controls, and UI workflows.
  • Modules/Deployment.psm1: partitioning and Windows application/configuration.
  • Modules/WindowsSources.psm1: source discovery, ISO mounting, and edition listing.
  • Modules/Partitioning.psm1 and Partitioning/Profiles/*.psd1: partitioning profile loading and validation.
  • Modules/DriverManagement.psm1: driver pack search based on hardware and Windows edition.
  • Modules/Unattend.psm1, Unattend/Profiles/*.psd1, and Unattend/Templates/*.xml: profiles and answer file generation.
  • Modules/Configuration.psm1: reading DeployCenter.ini.
  • Modules/Logging.psm1: logging and final log copy.
  • Modules/Localization.psm1 and Locales/*.psd1: UI language and DeployCenter messages.
  • Modules/ThemeManager.psm1 and Themes/*.psd1: UI color palettes.

PSD1 profiles are configuration data; keep their structure and IDs consistent. PowerShell and profile files used by Windows PowerShell 5.1 should remain UTF-8 with BOM so accented characters are read correctly.