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-ConfigurationDotNetService

Module
PSPublishModule
Inputs
None
Outputs
PowerForge.DotNetPublishServicePackageOptions

Creates service packaging options for DotNet publish targets.

Syntax

New-ConfigurationDotNetService
[-Arguments <String>]
[-ConfigBootstrap <DotNetPublishConfigBootstrapRule[]>]
[-Description <String>]
[-DisplayName <String>]
[-ExecutablePath <String>]
[-GenerateInstallScript <Boolean>]
[-GenerateRunOnceScript <Boolean>]
[-GenerateUninstallScript <Boolean>]
[-Lifecycle <DotNetPublishServiceLifecycleOptions>]
[-Recovery <DotNetPublishServiceRecoveryOptions>]
[-ServiceName <String>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Create service package options

$lifecycle = New-ConfigurationDotNetServiceLifecycle -Enabled
New-ConfigurationDotNetService -ServiceName 'My.Service' -GenerateInstallScript -GenerateUninstallScript -Lifecycle $lifecycle

Parameters

-Arguments String optional
Optional service arguments.
-ConfigBootstrap DotNetPublishConfigBootstrapRule[] optional
Optional config bootstrap rules.
-Description String optional
Description text.
-DisplayName String optional
Display name.
-ExecutablePath String optional
Executable path relative to output.
-GenerateInstallScript Boolean optional
Generates Install-Service.ps1.
-GenerateRunOnceScript Boolean optional
Generates Run-Once.ps1.
-GenerateUninstallScript Boolean optional
Generates Uninstall-Service.ps1.
-Lifecycle DotNetPublishServiceLifecycleOptions optional
Optional lifecycle settings.
-Recovery DotNetPublishServiceRecoveryOptions optional
Optional recovery settings.
-ServiceName String optional
Service name.

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.