ScriptBlockAst.GetScriptBlock Method

Definition

Convert the ast into a script block that can be invoked.

public:
 System::Management::Automation::ScriptBlock ^ GetScriptBlock();
public System.Management.Automation.ScriptBlock GetScriptBlock ();
member this.GetScriptBlock : unit -> System.Management.Automation.ScriptBlock
Public Function GetScriptBlock () As ScriptBlock

Returns

The compiled script block.

Exceptions

Thrown if there are any semantic errors in the ast.

Applies to