API Reference
Cmdlet
New-ConfigurationDotNetState
Creates preserve/restore state options for DotNet publish targets.
Remarks
Creates preserve/restore state options for DotNet publish targets.
Examples
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 SetsParameters
- ClearStorage Boolean
- Clears storage before preserving state.
- Enabled SwitchParameter
- Enables state preservation.
- OnMissingSource DotNetPublishPolicyMode
- Policy for missing source paths.
- Possible values:
Warn,Fail,Skip - OnRestoreFailure DotNetPublishPolicyMode
- Policy for restore failures.
- Possible values:
Warn,Fail,Skip - Rules DotNetPublishStateRule[]
- State rules.
- StoragePath String
- Optional storage path template.
Outputs
PowerForge.DotNetPublishStatePreservationOptions