-
-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Labels
Description
Conversion
If you have a ScriptBlock that you need to convert, in an ad-hoc manner, you can manually call Convert-PodeScopedVariables yourself. You should supply the -ScriptBlock to wish to convert, as well as an optional -PSSession SessionState from $PSCmdlet.SessionState, to this function:
convert the scriptblock's scoped variables
$ScriptBlock, $usingVars = Convert-PodeScopedVariables -ScriptBlock $ScriptBlock -PSSession $PSCmdlet.SessionState
invoke the converted scriptblock, and supply any using variable values
$result = Invoke-PodeScriptBlock -ScriptBlock $ScriptBlock -UsingVariables $usingVars -Splat -Return
Hi @Badgerati
I read document about scoped variables, and this conversion I get lost, how to use this, even if right now I do not need it yet but better understand still would be good.
Thanks
Eric Xin
Metadata
Metadata
Assignees
Labels
Projects
Status
Backlog