ScriptBlockAst.GetScriptBlock Method

Definition

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

public:
 System::Management::Automation::ScriptBlock ^ GetScriptBlock();

Returns

The compiled script block.

Exceptions

Thrown if there are any semantic errors in the ast.

Applies to

Product Versions
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0