Project

PSPublishModule

Build, test, version, sign, and publish PowerShell modules with reusable PowerForge pipelines.

Stars 48
Forks 16
PowerShell Gallery downloads 17,213
Release v3.0.186
Language: C# Updated: 2026-11-04
Command

Invoke-ValidationCommand

Module
PSPublishModule
Inputs
PowerForge.ReleaseCommandValidation
Outputs
PowerForge.ProcessRunResult

Runs a bounded validation process and returns its captured output.

Syntax

Invoke-ValidationCommand
-Command <ReleaseCommandValidation>
[-ProjectRoot <String>]
[-Variables <Hashtable>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Use this for product-specific probes that must inspect structured process output. PowerForge owns timeout, cancellation, argument quoting, and expected-exit checks.

Examples

Read product diagnostics as JSON

$result = Invoke-ValidationCommand -Command @{ FileName = './tool.exe'; Arguments = @('diagnostics', '--json'); OutputJsonKind = 'Object' }; $result.StdOut | ConvertFrom-Json

Parameters

-Command ReleaseCommandValidation requiredpipeline: True (ByValue)
Executable, arguments, timeout, environment, and output expectations.
-ProjectRoot String optional
Root for relative paths. Defaults to the current PowerShell filesystem location.
-Variables Hashtable optional
Named substitutions for command arguments, environment, and paths.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.