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.169
Language: C# Updated: 2026-10-17
Command

New-ConfigurationDotNetServiceLifecycle

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>]
#
Parameter set: All Parameter Sets

Examples

Authored help example

Create lifecycle options

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.