# New-ConfigurationDotNetServiceHealthCheck

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

Project

PSPublishModule

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

[View on GitHub](https://github.com/EvotecIT/PSPublishModule) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSPublishModule/releases/tag/v3.0.124) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSPublishModule/2.0.27)

Stars **48**

Forks **15**

Open issues **1**

PowerShell Gallery downloads **17,213**

Release **v3.0.195**

Language: C# Updated: 2026-11-25

Command 

**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>]
```

[#](#method-new-configurationdotnetservicehealthcheck-int32-string-string-string-dotnetpublishpolicymode-int32-int32-string)

Parameter set: `All Parameter Sets`

## Examples

### Create a service health check

```powershell
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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:B658A47F91EAAD979D3A157D21ECC2637CE71649B29D07A595514B760C8FF9A0 -->
