Evotec

Project

PSPublishModule

PSPublishModule is an open-source PowerShell and .NET project with packages, release history, and technical documentation.

Stars 43
Forks 13
Open issues 1
PowerShell Gallery downloads 13,876
Release v3.0.3
Language: C# Updated: 2026-04-14

API Reference

Cmdlet

New-ConfigurationDotNetState

Namespace PSPublishModule
Inputs
None
Outputs
PowerForge.DotNetPublishStatePreservationOptions

Creates preserve/restore state options for DotNet publish targets.

Remarks

Creates preserve/restore state options for DotNet publish targets.

Examples

Authored help example

Create state preservation options


$rule = New-ConfigurationDotNetStateRule -SourcePath 'config.json' -Overwrite
New-ConfigurationDotNetState -Enabled -Rules $rule -StoragePath 'Artifacts/DotNetPublish/State/{target}/{rid}/{framework}/{style}'
        

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.

Syntax

New-ConfigurationDotNetState [-ClearStorage <Boolean>] [-Enabled] [-OnMissingSource <Warn|Fail|Skip>] [-OnRestoreFailure <Warn|Fail|Skip>] [-Rules <DotNetPublishStateRule[]>] [-StoragePath <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

ClearStorage Boolean optionalposition: namedpipeline: False
Clears storage before preserving state.
Enabled SwitchParameter optionalposition: namedpipeline: False
Enables state preservation.
OnMissingSource DotNetPublishPolicyMode optionalposition: namedpipeline: Falsevalues: 3
Policy for missing source paths.
Possible values: Warn, Fail, Skip
OnRestoreFailure DotNetPublishPolicyMode optionalposition: namedpipeline: Falsevalues: 3
Policy for restore failures.
Possible values: Warn, Fail, Skip
Rules DotNetPublishStateRule[] optionalposition: namedpipeline: False
State rules.
StoragePath String optionalposition: namedpipeline: False
Optional storage path template.

Outputs

PowerForge.DotNetPublishStatePreservationOptions