Skip to content

WimWizard 5.2.2 - SCCM Integration

Choose a tag to compare

@TacII TacII released this 18 May 07:23
· 33 commits to main since this release
826542e

What's new since 5.1.8 / 2.5.1


WimWizard.ps1

5.2.2 — Fix: WIM not moved to package path before CM cmdlet call

Invoke-SCCMImport now moves the finished WIM to $SCCMPackagePath before calling the CM cmdlet. Previously the WIM was left in the local output folder, causing a WqlQueryException: Not found from SCCM. Move is skipped when source and destination resolve to the same path. Move failure is surfaced as a warning (non-

5.2.1 — Fix: -SCCMVersion now optional

When omitted, Invoke-SCCMImport uses the version string already derived from the ISO filename during the build (e.g. 25H2, 24H2 LTSC). -Version is omitted from the CM cmdlet call entirely if neither source yields a value.

fatal).

5.2.0 — New: SCCM/MECM auto-import

Nine new parameters enable fully automated SCCM import after a successful build, suitable for scheduled tasks. Uses the ConfigurationManager PowerShell module (requires SCCM Admin Console installed on the build machine). Supports both creating new OS Image packages and updating existing ones by Package ID. SCCM import failure is non-fatal — the build exit code is not affected.

Parameter Description
-SCCMImport Trigger import after a successful build
-SCCMServer FQDN of the site server
-SCCMSiteCode Three-character site code (e.g. FC1)
-SCCMPackagePath UNC path where the WIM file will be stored
-SCCMPackageName Package display name
-SCCMVersion Version string for the package (optional — falls back to ISO-derived value, e.g. 25H2)
-SCCMComment Package description (optional)
-SCCMPackageID Existing package to update — omit to create a new package
-SCCMUpdateDPs Trigger a distribution point update after import

WimWizard-GUI.ps1 — 2.2.5 → 2.5.1

2.5.1 — ComboBox now triggers command preview

  • Fix: Image edition ComboBox now triggers command preview update on selection change (Add_SelectedIndexChanged wired to Update-UI).
  • Fix: Receive-Job result coerced to single string to prevent index list from leaking into $Script:EditionTag. Where-Object on ComboBox.Items replaced with explicit foreach loop.
  • Help tab updated with Image edition documentation and -WimIndex standalone example. WimWizard.ps1 -WimIndex help text expanded.

2.5.0 — New Image/Index selector adds support for Windows Pro and other editions

2.4.33 — GUI polish

  • Skip Appx Removal now disables and unchecks the entire Applications tab while active, and restores selections when deactivated
  • FoD checkboxes now trigger Update-UI on change — missing Add_CheckedChanged wiring meant toggling a FoD never updated the filename preview, SCCM package name preview, or command string
  • Tab order: Options → Languages → Applications → Features on Demand → SCCM → Patch WIM → Help
  • Command preview bar: label and command text on the same line; LblCmd widened to 548 px, 3-line height
  • Run button: changes to Running... and disables on click; restored to > Run on all exit paths
  • Package ID search in Patch WIM tab no longer fires when Patch Mode is disabled

Key fixes applied in 2.4.1–2.4.32:

  • Launcher path settled on %ProgramData%\WimWizard\ — writable by non-elevated GUI, readable by elevated child, consistent across sessions
  • Form.Activate() replaced with Form.BringToFront() — Activate() was firing click events on the Run button and re-invoking the build
  • All file copy operations now happen before Push-Location into the CM PSDrive — Copy-Item inside the CM PSDrive silently returns $null
  • PkgSourcePath file-vs-folder detection: SCCM stores the full WIM file path, not a folder — Join-Path was producing a doubled path
  • Local WIM patch flow now copies source WIM to Output\WIMServicing_Work\ before launch, ensuring the elevated process can access it
  • Launcher script built with Set-Content string array — previous interpolated string broke on UNC paths containing spaces
  • Timer tick null-guards for $Script:BuildProc and $Script:BuildTimer to prevent double-dispose crash

2.4.0 — New: Patch WIM tab

A new Patch WIM tab (Tab 6, between SCCM and Help) provides a dedicated workflow for patching an existing WIM, including a full SCCM round-trip:

  • Source — From SCCM package: Package ID with live validation, auto-populates package name and WIM filename. Local WIM file: file picker, auto-populates output filename
  • Details & Action — Package name field with {Date} button and live preview. Radio pair: Replace existing package / Create new package. Inactive column grayed out when switching source
  • Full SCCM round-trip — GUI copies the WIM from SCCM to Output\WIMServicing_Work\, launches WimWizard.ps1 -PatchExistingWim elevated via a launcher in %ProgramData%\WimWizard\, copies the patched WIM back to the UNC source path, then updates or creates the SCCM package. DP update optional
  • Enabling Patch Mode disables the Languages, Applications, and Features on Demand tabs
  • Completion screen shows the resolved SCCM package name above the WIM filename when auto-import ran
  • No new CLI parameters in WimWizard.ps1 — the full patch+SCCM flow is handled in the GUI

Fixes applied in 2.3.2–2.3.7 (selected):

  • WIM now moved to UNC package path before CM cmdlet call (same root cause as 5.2.2 fix)
  • Package storage path browse now uses OpenFileDialog to support UNC path input
  • {Version} now resolves correctly in patch mode (derived from patched WIM's build number)
  • GUI-side SCCM import block removed from timer tick — import outcome determined solely by engine exit code
  • $Script:BuiltWimPath stored at run-click time, eliminating path concatenation bugs in the timer tick

2.3.0 — New: SCCM tab

A new SCCM tab (Tab 5, between Features on Demand and Help) handles the full SCCM import workflow without touching the command line:

  • Site server connection — FQDN, site code, Test Connection button with three states. CM module presence detected at startup; import and Test buttons disabled if the module is absent
  • Package name template — Free-text field with {Version}, {Languages}, {FoD}, and {Date} toggle buttons. Live green preview updates as you type. {Date} is always resolved to today and never saved to the registry
  • Import mode — Radio pair: create new package / update existing by Package ID (8-char, live-validated against SCCM)
  • Manual Import button — RichTextBox summary showing package name, mode, and DP status. Grayed out when auto-import is enabled
  • Completion screen — Amber warning label shown when build succeeds but auto-import fails
  • Dynamic window width — SCCM and Help tabs expand the form from 620 px to 980 px; other tabs shrink it back
  • 10 new registry keys persisted under HKCU:\Software\FidelityConsulting\WimWizard

Upgrade notes

  • No changes to ISO-Source\, Updates\, or Output\ folder structure
  • New SCCM registry keys created automatically on first use under HKCU:\Software\FidelityConsulting\WimWizard
  • SCCM integration requires the CM PowerShell module — GUI detects presence at startup
  • Patch WIM launcher written to %ProgramData%\WimWizard\ — folder created automatically on first run