Commit Graph

4 Commits

Author SHA1 Message Date
gsadmin d6c5799f7e Remove the Storage module dependency and add the SPICE guest tools installation
- The ISO is now mounted, resolved to a volume, and dismounted through the
  storage CIM provider directly instead of through the "Storage" module, which
  is not present within every Windows PE boot image. The "MSFT_DiskImage" class
  is projected as cmdlets using the new "Toolkit\Libraries\Storage\DiskImage.cdxml"
  definition, so only the storage CIM provider itself is required
- The volume is resolved through the "MSFT_DiskImageToVolume" association rather
  than through "Get-Volume", and the drive letter is normalized because the
  provider exposes it as a character
- Removed the "Storage" module requirement from the requires statement
- Added the "-InstallSpiceGuestTools" parameter, which downloads and installs the
  SPICE guest tools. The installer is not digitally signed and exposes no version
  resource, therefore the driver signing certificates are read from the driver
  catalogs contained within the installer itself, imported into the trusted
  publishers store, and the expanded content is then removed. The installer is
  executed using its own normal installation method, which results in a
  completely silent installation with no driver prompts
- Added the new "Import-TrustedPublisherCertificate" toolkit function, which
  reads the signing certificate of each signed file within one or more
  directories and imports the distinct certificates into a configurable
  certificate store
- The archive utility required to expand the installer ships within
  "Toolkit\Tools\X64" and is located by searching the architecture specific
  directories, the architecture neutral directory, and then the local download
  directory. It is only downloaded when no existing copy is present, and the
  downloaded package is expanded using an administrative installation so that
  the product itself is never installed
- Anything downloaded at runtime is written beneath "%WinDir%\Temp\<ScriptBaseName>"
  so that a read only or UNC script location is never written to
- Both the guest agent and the SPICE guest tools are gated to the full operating
  system and are skipped automatically within Windows PE, so a single command
  line is safe for both deployment passes
- Updated the README with the Windows PE and full operating system command lines,
  the gating behavior, and the SPICE guest tools details

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 16:28:06 -04:00
gsadmin a9479d2faa Use cached downloads as-is and follow redirects to the resolved download URL
- Skip the web request entirely when the destination file already exists: the cached file is always used and never automatically updated (delete the local file to force a fresh download)
- Only contact the download URL when a download is actually required, with a 30 second metadata request timeout and explicit redirect following
- Download directly from the resolved post-redirect URL (mirror style URLs commonly redirect)
- An unreachable download URL is only fatal when no local copy of the file exists

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 16:58:37 -04:00
gsadmin a7105300d0 Make download URL check non-fatal when a local copy exists and only use a proxy when one actually applies
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 16:50:23 -04:00
gsadmin 8889f41c7c Refactor to script template and toolkit flow with PS7 compatibility
- Adopt the standardized Toolkit layout (Toolkit.ps1 + Functions/Modules/Libraries/Tools)
- Replace the legacy NLog-era Registry.dll with Eric Zimmerman Registry 2026.5.0 (netstandard2.0) for offline hive parsing without mounting; libraries are loaded into memory in dependency order (byte load on Windows PowerShell 5.1, dedicated AssemblyLoadContext stream load on PowerShell 7)
- Rewrite Invoke-RegistryHiveAction with a case-insensitive ValueTable contract for direct value name indexing
- Rewrite Invoke-FileDownloadWithProgress with automatic system proxy detection and progress reporting
- Convert Copy-ItemWithProgress, Get-InstalledSoftware, and the MSI helper functions to the toolkit logging and error handling patterns
- Add opt-in QEMU guest agent installation from the mounted ISO (full operating system only, version-aware, REBOOT=ReallySuppress)
- Remove the task sequence variable parameters from the script surface while retaining the toolkit functionality
- Update README with structure, usage, and OS deployment guidance (DeployR/MDT/SCCM two-pass flow, pwsh.exe for DeployR boot images)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 14:38:29 -04:00