API Reference
Command
Get-ConfigurationBoolean
Resolves a boolean configuration value from an environment variable with a script-defined default.
Remarks
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)
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
Get-ConfigurationBoolean [-Default <Boolean>] -Name <String> [<CommonParameters>]#Parameter set:
All Parameter SetsParameters
- Default Boolean
- Value returned when the environment variable is missing or blank.
- Name String
- Environment variable name to read.
Outputs
System.Boolean