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

Get-ConfigurationBoolean

Module
PSPublishModule
Inputs
None
Outputs
System.Boolean

Resolves a boolean configuration value from an environment variable with a script-defined default.

Syntax

Get-ConfigurationBoolean
[-Default <Boolean>]
[-Name] <String>
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

This helper is intended for build DSL scripts that need environment overrides without repeating [bool]::Parse boilerplate in every repository.

Examples

Default to manifest-only builds unless RefreshPSD1Only is set in the environment

New-ConfigurationBuild -RefreshPSD1Only:(Get-ConfigurationBoolean RefreshPSD1Only -Default $true)

Parameters

-Default Boolean optional
Value returned when the environment variable is missing or blank.
-Name String requiredposition: 0aliases: VariableName
Environment variable name to read.

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.