Commit Graph

20 Commits

Author SHA1 Message Date
gsadmin aa9343a2e5 Normalize the offline image root path passed to DISM
- The offline image root path passed to the DISM "/Image:" parameter had its
  trailing directory separator removed, which produced a drive relative value
  such as "S:" rather than the root of the volume such as "S:\"
- A drive relative path resolves to the current directory of that drive rather
  than to its root, so DISM was unable to locate the offline operating system
  and failed with exit code 2 whenever the current directory of that drive was
  not the root
- Any trailing directory separator(s) are now removed and exactly one is
  appended, so that the value is always the root of the volume regardless of
  how the path was originally produced
- The value is intentionally not quoted, because a trailing directory separator
  immediately before a closing quote escapes that quote and would pass a
  malformed argument to DISM

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 17:25:38 -04:00
freedbygrace 0fd88abb4e Merge pull request #4 from Grace-Solutions/development
Remove the Storage module dependency and add the SPICE guest tools installation
2026.08.20.2030
2026-08-20 16:28:45 -04:00
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
freedbygrace a71a67b671 Merge pull request #3 from Grace-Solutions/development
Use any existing ISO within the download destination regardless of file name
2026.08.19.2148
2026-08-19 17:48:28 -04:00
gsadmin b5836f8dd9 Use any existing ISO within the download destination regardless of file name
- The download destination directory is scanned for *.iso before any download occurs, and the latest existing ISO is used as-is, skipping the download entirely
- Nothing depends on the virtio-win.iso file name anymore, so pre-delivered or renamed ISO images are plug and play as the ISO name changes over time
- The UNC-to-local copy path now stages whichever ISO was selected (existing or freshly downloaded)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 17:48:20 -04:00
freedbygrace 78bf0a19ba Merge pull request #2 from Grace-Solutions/development
Use cached downloads as-is and follow redirects to the resolved download URL
2026.08.19.2059
2026-08-19 16:59:45 -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 0fadf0876e Standardize examples on -Install -InstallGuestAgent with automatic skip notes
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 15:45:06 -04:00
gsadmin 4fe1f7d7ca Add virtual machine template and hypervisor migration guidance to README
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 15:40:28 -04:00
freedbygrace 9b80c4a81b Merge pull request #1 from Grace-Solutions/development
Refactor to script template and toolkit flow with PS7 compatibility
2026-08-19 14:46:29 -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
freedbygrace f0595133fb Update README with improved script usage details
Clarified usage scenarios for the script in the README.
2026-07-21 10:58:56 -04:00
freedbygrace 7ab65ad6e8 Delete Invoke-VirtIODrivers.vbs 2026-07-21 10:56:50 -04:00
freedbygrace b5b0027afd Add PSBootstrapper
Add PSBootstrapper in preparation for vbscript replacement
2026-07-21 10:56:36 -04:00
freedbygrace ed7b7456d6 Update README.md 2025-02-14 15:46:07 -05:00
freedbygrace 62a1e28b87 Update README.md 2025-02-13 13:50:18 -05:00
freedbygrace 1607ecfc56 Update README.md 2025-02-13 13:23:08 -05:00
freedbygrace 949d343154 Add files via upload 2025-02-13 12:58:22 -05:00
freedbygrace 07aa62d559 Initial commit 2025-02-13 12:55:39 -05:00