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

New-ConfigurationDotNetServiceHealthCheck

Module
PSPublishModule
Inputs
None
Outputs
PowerForge.DotNetPublishServiceHealthCheck

Creates an HTTP readiness check for DotNet publish service lifecycle verification.

Syntax

New-ConfigurationDotNetServiceHealthCheck
[-ExpectedStatusCode <Int32>]
[-ExpectedValue <String>]
[-Id <String>]
[-JsonPath <String>]
[-OnFailure <Warn|Fail|Skip>]
[-PollIntervalMilliseconds <Int32>]
[-TimeoutSeconds <Int32>]
-Uri <String>
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Create a service health check

New-ConfigurationDotNetServiceHealthCheck -Id Runtime -Uri 'http://127.0.0.1:58433/runtime' -JsonPath 'status' -ExpectedValue 'Ready'

Parameters

-ExpectedStatusCode Int32 optional
Expected HTTP status code. Defaults to 200.
-ExpectedValue String optional
Optional expected JSON scalar value at JsonPath. When omitted, the check only verifies that the path exists.
-Id String optional
Optional check identifier used in logs and failure messages.
-JsonPath String optional
Optional dot-separated JSON path to validate in the response body. Array indexes can be expressed as property[0].
-OnFailure DotNetPublishPolicyMode optional
Policy used when the health check does not pass before timeout.
Possible values: Warn, Fail, Skip
-PollIntervalMilliseconds Int32 optional
Delay in milliseconds between polling attempts.
-TimeoutSeconds Int32 optional
Maximum time in seconds to wait for the endpoint to pass.
-Uri String required
Absolute HTTP or HTTPS endpoint to poll. Supports service lifecycle tokens such as {serviceName}, {outputDir}, and {executablePath}.

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.