Execution
5.2.0
Common execution helpers, self-elevation and stub-script wrapper for PowerShell.
Minimum PowerShell version
5.1
Installation Options
Owners
Copyright
(c) 2026 mtb.me. All rights reserved.
Package Details
Author(s)
- Manuel
Tags
Execution Self-Elevation Stub PowerShell Windows
Functions
Clear-TempDirectories ConvertTo-SplatHashtable Exit-AndWaitOnUI Format-SplatHashtable Get-QuotedPath Invoke-NativeCommand Invoke-StubScript Invoke-WhenFileChanged Remove-ItemSafe Remove-NativeProgressNoise Restart-SelfElevated Set-PSScriptID
PSEditions
Dependencies
This module has no dependencies.
Release Notes
Execution v5.2.0+sha.181b724
## [v5.2.0] - 2026-05-06
### Added
- `Remove-NativeProgressNoise`: new public helper that filters
carriage-return progress lines (DISM `[==XX.X%==]`, robocopy plain
percent, sfc, ...) out of captured native-command output. Pipeline
in / pipeline out, retains the final tick by default so users still
see the "100% / done" line; `-StripFinalProgress` drops every
tick. Workaround for #13's underlying capture asymmetry between
the wrapped backends and the bare `&` operator: native-command
progress that the console host would render as a single
overwriting line is captured by `Invoke-NativeCommand` as one
entry per progress tick, and this helper lets callers post-process
that capture without re-implementing the regexes themselves.
- `Invoke-NativeCommand`: new `-RawStream` switch for native-passthrough
mode. Stdout / stderr inherit the parent's handles instead of being
redirected, so the console host applies CR semantics in place: DISM /
robocopy / sfc progress overwrite themselves on a single line exactly
the way the bare `&` operator behaves. The wrapper still owns process
lifetime, exit-code surfacing, working-directory wrapping, `-WhatIf`,
and the graceful-then-hard timeout sequence; it just opts out of the
capture machinery for the call. Triggers the Process backend; `-PassThru`
is allowed but `Output` / `Stdout` / `Stderr` are `$null`. Mutually
exclusive with `-Stream`, `-Encoding`, `-NoWait`, and
`-Backend ScriptBlock` -- each combination raises a terminating error
rather than silently degrading. Closes the live-output gap that
`Remove-NativeProgressNoise` left open (#13 follow-up).
### Fixed
- `Invoke-NativeCommand -Stream`: defensive hardening for the
streaming drain when wrapped subprocesses emit `\n`-only lines
(trailing newlines, section separators, fake-progress scripts
ending in `[Console]::WriteLine()`). Drops `[Parameter(Mandatory)]`
on the per-line accumulator parameters of the internal
`Read-NativeEventBatch` helper -- they remain strongly typed and
the only caller always supplies them, so loss of binder-level
enforcement is purely theoretical. Initialises `$snapshot` to
`$null` ahead of the backend call and early-returns if the backend
swallowed its own error: prevents a strict-mode follow-on
`$snapshot cannot be retrieved because it has not been set` from
masking the original failure. (#14)
FileList
- Execution.nuspec
- Execution.psd1
- Execution.psm1
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 5.3.2 | 20 | 5/11/2026 |
| 5.3.1 | 135 | 5/8/2026 |
| 5.3.0 | 103 | 5/7/2026 |
| 5.2.1 | 48 | 5/6/2026 |
| 5.2.0 (current version) | 85 | 5/6/2026 |
| 5.1.0 | 105 | 5/5/2026 |
| 5.0.0 | 7 | 5/5/2026 |
| 4.0.0 | 70 | 5/4/2026 |
| 3.0.1 | 497 | 4/16/2026 |
| 3.0.0 | 7 | 4/16/2026 |
| 2.1.1 | 1,663 | 12/29/2025 |
| 2.1.0 | 6 | 12/29/2025 |
| 2.0.2 | 75,833 | 4/28/2024 |
| 2.0.1 | 328 | 4/27/2024 |
| 2.0.0 | 11 | 4/26/2024 |
| 1.7.0 | 23,958 | 3/9/2020 |
| 1.6.2 | 447 | 2/5/2020 |
| 1.6.1 | 86 | 2/3/2020 |
| 1.6.0 | 42 | 2/3/2020 |
| 1.5.1 | 2,278 | 4/24/2019 |
| 1.5.0 | 201 | 4/1/2019 |
| 1.4.4 | 51 | 3/31/2019 |
| 1.4.3 | 43 | 3/31/2019 |
| 1.4.2 | 45 | 3/31/2019 |
| 1.4.1 | 43 | 3/30/2019 |
| 1.4.0 | 42 | 3/30/2019 |
| 1.3.0 | 43 | 3/30/2019 |
| 1.2.2 | 43 | 3/29/2019 |
| 1.2.1 | 42 | 3/29/2019 |
| 1.2.0 | 67 | 3/28/2019 |
| 1.1.0 | 48 | 3/27/2019 |
| 1.0.2 | 46 | 3/26/2019 |
| 1.0.1 | 104 | 3/17/2019 |
| 1.0.0 | 68 | 3/17/2019 |