Convert PodeScopedVariables - mdaneri/Pode GitHub Wiki
external help file: Pode-help.xml Module Name: Pode online version: PodeType: ScopedVariables schema: 2.0.0
Converts Scoped Variables within a given ScriptBlock.
Convert-PodeScopedVariables [[-ScriptBlock] <ScriptBlock>] [[-PSSession] <SessionState>]
[[-Exclude] <String[]>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Converts Scoped Variables within a given ScriptBlock, and returns the updated ScriptBlock back, including any using-variable values that will need to be supplied as parameters to the ScriptBlock first.
$ScriptBlock, $usingVars = Convert-PodeScopedVariables -ScriptBlock $ScriptBlock -PSSession $PSCmdlet.SessionState
$ScriptBlock = Convert-PodeScopedVariables -ScriptBlock $ScriptBlock -Exclude Session, Using
An optional array of one or more Scoped Variable Names to Exclude from converting. (ie: Session, Using, or a Name from Add-PodeScopedVariable)
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
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: FalseAn optional SessionState object, used to retrieve using-variable values. If not supplied, using-variable values will not be converted.
Type: SessionState
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe ScriptBlock to be converted.
Type: ScriptBlock
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.