Repository navigation
PowerStub v2.2.0
·
4 commits
to main
since this release
PowerStub 2.2.0
- New
Start-PowerStubJobcommand (aliasStart-PstbJob): a drop-in replacement forStart-Jobin whichpstb,Invoke-PowerStubCommandand your direct aliases work.Start-Jobalone cannot run them, because a background job does not load your profile, so a job that called a direct alias failed withThe term 'rdeploy' is not recognized. - It takes exactly the same parameters as
Start-Job, and imports the same PowerStub module and settings your session is using before the job runs.$using:variables (including function and script locals), pipeline input,-ArgumentList,-FilePathand your own-InitializationScriptall work as they do withStart-Job. - It works from inside stub commands, for example a script that runs one health check per service in parallel jobs.
- Windows PowerShell jobs (
-PSVersion 5.1) are refused with a clear error, because PowerStub needs PowerShell 7. - See "Background Jobs" in the README.
Whats Changed
- feat(jobs): add Start-PowerStubJob for PowerStub commands in background jobs
Full Changelog: v2.1.2...v2.2.0