Condividi tramite


ScriptBlock.InvokeReturnAsIs(Object[]) Method

Definition

Execute this node with the specified arguments. The arguments show up in the script as $args. This overload return the raw (unwrapped) result so it can be more efficient.

public:
 System::Object ^ InvokeReturnAsIs(... cli::array <System::Object ^> ^ args);
public object InvokeReturnAsIs (params object[] args);
member this.InvokeReturnAsIs : obj[] -> obj
Public Function InvokeReturnAsIs (ParamArray args As Object()) As Object

Parameters

args
Object[]

The arguments to pass to this scriptblock.

Returns

The object(s) generated during the execution of the script block. They may or may not be wrapped in PSObject. It's up to the caller to check.

Exceptions

Thrown if the maximum scope depth has been exceeded

Thrown if a script runtime exceptionexception occurred.

An internal (non-public) exception from a flow control statement.

Applies to