Command
New-ConfigurationDotNetServiceLifecycle
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 SetsExamples
Create lifecycle options
New-ConfigurationDotNetServiceLifecycle -Enabled -Mode Step -StopIfExists -DeleteIfExists -Install -Start -VerifyParameters
- -DeleteIfExists Boolean
- Delete existing service before reinstall.
- -Enabled SwitchParameter
- Enables lifecycle execution.
- -HealthCheck DotNetPublishServiceHealthCheck[]
- Optional HTTP readiness checks executed after service state verification.
- -Install Boolean
- Install or reinstall service.
- -Mode DotNetPublishServiceLifecycleMode
- Lifecycle execution mode.
- Possible values:
Step,InlineRebuild - -OnExecutionFailure DotNetPublishPolicyMode
- Policy on lifecycle execution failures.
- Possible values:
Warn,Fail,Skip - -OnUnsupportedPlatform DotNetPublishPolicyMode
- Policy on non-Windows platforms.
- Possible values:
Warn,Fail,Skip - -Start Boolean
- Start service after install.
- -StopIfExists Boolean
- Stop existing service before reinstall.
- -StopTimeoutSeconds Int32
- Stop timeout in seconds.
- -Verify Boolean
- Verify service status after actions.
- -WhatIfMode SwitchParameter
- 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.