external help file: SitecoreInstallFramework-help.xml
online version:
schema: 2.0.0
---
Returns a value based on the result of a condition.
Invoke-IfConfigFunction [-Condition] <PSObject> [-WhenTrue] <PSObject> [-WhenFalse] <PSObject>
[<CommonParameters>]
Evaluates the given Condition
, returning WhenTrue
if the condition is true,
otherwise WhenFalse
is returned.
Objects passed to Condition
are evaluated through standard PowerShell boolean
coercion. String values are trimmed before being evaluated.
PS C:\> Invoke-IfConfigFunction -Condition $value -WhenTrue 'abc' -WhenFalse 'def'
Evaluates $value
as a boolean. If $value
is a non-empty string the value
'abc' is returned. Otherwise the value 'def' will be returned.
The value to check as a boolean.
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The value returned if Condition
is found to be $true
.
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The value returned if Condition
is found to be $false
.
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).