Skip to content

PowerStub v2.2.0

Choose a tag to compare

@devpossible-richard devpossible-richard released this 06 Oct 02:20
· 4 commits to main since this release

PowerStub 2.2.0

  • New Start-PowerStubJob command (alias Start-PstbJob): a drop-in replacement for Start-Job in which pstb, Invoke-PowerStubCommand and your direct aliases work. Start-Job alone cannot run them, because a background job does not load your profile, so a job that called a direct alias failed with The 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, -FilePath and your own -InitializationScript all work as they do with Start-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