Convert PodeScopedVariable - mdaneri/Pode GitHub Wiki
external help file: Pode-help.xml Module Name: Pode online version: PodeType: ScopedVariables schema: 2.0.0
Converts a Scoped Variable within a given ScriptBlock.
Convert-PodeScopedVariable [-Name] <String> [[-ScriptBlock] <ScriptBlock>] [[-PSSession] <SessionState>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Converts a Scoped Variable within a given ScriptBlock, and returns the updated ScriptBlock back, including any other values that will need to be supplied as parameters to the ScriptBlock first.
$ScriptBlock = Convert-PodeScopedVariable -Name State -ScriptBlock $ScriptBlock
$ScriptBlock, $otherResults = Convert-PodeScopedVariable -Name Using -ScriptBlock $ScriptBlock
The Name of the Scoped Variable to convert. (ie: Session, Using, or a Name from Add-PodeScopedVariable)
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
An optional SessionState object, used to retrieve using-variable values or other values where scope is required.
Type: SessionState
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The ScriptBlock to be converted.
Type: ScriptBlock
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
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.