Skips Invoke-WebRequest progress-rendering overhead; the gallery
redirect is followed automatically.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The PowerShell SDK ships only the core engine modules, so gallery
access on a bare endpoint depended on whatever happened to be
installed. Package-Agent now stages pinned PSGallery downloads
(PSResourceGet 1.2.0, Archive 1.2.6, ThreadJob 2.2.0) into a Modules
directory next to the binary for every platform, the MSI installs it,
and the agent prepends it to PSModulePath — covering the embedded
engine and, via process-environment inheritance, Windows PowerShell
5.1 child processes too. Install-PSResource needs no NuGet-provider
bootstrap, and AllUsers installs land on the standard module path
where later jobs resolve them.
Verified in the embedded host with only the bundled directory on the
path: PSResourceGet loads and reports PSGallery, Compress-Archive
produces a zip, Start-ThreadJob round-trips. Also drops the payload
trim rules for modules the SDK no longer ships.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>