# New-ConfigurationDotNetServiceLifecycle

Creates service lifecycle execution options for DotNet publish service targets.

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.DotNetPublishServiceLifecycleOptions`

Creates service lifecycle execution options for DotNet publish service targets.

## Syntax

```
New-ConfigurationDotNetServiceLifecycle
[-DeleteIfExists <Boolean>]
[-Enabled]
[-HealthCheck <DotNetPublishServiceHealthCheck[]>]
[-Install <Boolean>]
[-Mode <Step|InlineRebuild>]
[-OnExecutionFailure <Warn|Fail|Skip>]
[-OnUnsupportedPlatform <Warn|Fail|Skip>]
[-Start <Boolean>]
[-StopIfExists <Boolean>]
[-StopTimeoutSeconds <Int32>]
[-Verify <Boolean>]
[-WhatIfMode]
[<CommonParameters>]
```

[#](#member-a552233d83152c9fe760776e)

Parameter set: `All Parameter Sets`

## Examples

### Create lifecycle options

```powershell
New-ConfigurationDotNetServiceLifecycle -Enabled -Mode Step -StopIfExists -DeleteIfExists -Install -Start -Verify
```

## Parameters

**-DeleteIfExists Boolean optional**

Delete existing service before reinstall.

**-Enabled SwitchParameter optional**

Enables lifecycle execution.

**-HealthCheck DotNetPublishServiceHealthCheck[] optional**

Optional HTTP readiness checks executed after service state verification.

**-Install Boolean optional**

Install or reinstall service.

**-Mode DotNetPublishServiceLifecycleMode optional**

Lifecycle execution mode.

Possible values: `Step`, `InlineRebuild`

**-OnExecutionFailure DotNetPublishPolicyMode optional**

Policy on lifecycle execution failures.

Possible values: `Warn`, `Fail`, `Skip`

**-OnUnsupportedPlatform DotNetPublishPolicyMode optional**

Policy on non-Windows platforms.

Possible values: `Warn`, `Fail`, `Skip`

**-Start Boolean optional**

Start service after install.

**-StopIfExists Boolean optional**

Stop existing service before reinstall.

**-StopTimeoutSeconds Int32 optional**

Stop timeout in seconds.

**-Verify Boolean optional**

Verify service status after actions.

**-WhatIfMode SwitchParameter optional**

Simulates lifecycle actions.

## 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:1A8092CE73470902DF39DE4D01129B2F803BBB0CEF40C88E794EE1A1BE0D5F13 -->
