Execution

5.3.2

Common execution helpers, self-elevation and stub-script wrapper for PowerShell.

Minimum PowerShell version

5.1

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name Execution

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name Execution

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

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

Desktop Core

Dependencies

This module has no dependencies.

Release Notes

Execution v5.3.2+sha.18d2a46

## [v5.3.2] - 2026-05-11

### Fixed

- `Invoke-NativeCommand` (default mode): pipe-to-cmdlet usages like
 `Invoke-NativeCommand vswhere.exe -format json | ConvertFrom-Json`
 no longer fail with "The input object cannot be bound to any
 parameters for the command". The function used to emit the captured
 stdout as a single `[string[]]` object (`return ,$snapshot.Output`),
 which the comma operator wrapped in an outer array so PowerShell's
 pipeline-unrolling only stripped the wrap and left the
 inner array as one pipeline element. Cmdlets whose pipeline-input
 parameter is typed `[string]` (`ConvertFrom-Json`,
 `Select-String -InputObject`, ...) rejected the bind because a
 `string[]` cannot satisfy a `[string]` `ValueFromPipeline` slot.
 The wrap is now dropped; the captured lines stream one
 `[string]` per pipeline element, restoring the same shape the bare
 `&` operator produces. Assignment callers
 (`$out = Invoke-NativeCommand ...`) see the standard PowerShell
 scalar-or-array shape (scalar for a single line, `string[]` for
 multiple); no caller in this repo relied on the always-array form.
 `-PassThru` `.Output` is unaffected (still returned whole).
- `build.ps1`: pin `ModuleBuilder` below `3.2.0`. ModuleBuilder
 3.2.0 (published 2026-05-11) ships PowerShell 7-only syntax
 (`?:` ternary, pipe-leading whitespace) inside its own `.psm1`
 and therefore fails to import on Windows PowerShell 5.1
 outright. On PowerShell 7 it additionally fails the build with
 `Get-Metadata: Can't find 'AliasesToExport'` because it now
 expects that key to be present in the source manifest, where
 ours keeps it commented out. Both CI legs go red on every push
 until this is pinned. `Install-Module ModuleBuilder` now
 passes `-MaximumVersion 3.1.9`, and the matching
 `Import-Module` likewise restricts to `< 3.2.0` so an already
 installed 3.2.0 on a developer machine does not get picked up
 ahead of the older version. To revisit when ModuleBuilder
 releases a fix.

FileList

Version History

Version Downloads Last updated
5.3.2 (current version) 19 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 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
Show more