Compartilhar via


PSScriptMethod.Invoke(Object[]) Method

Definition

Invokes Script method and returns its results.

public:
 override System::Object ^ Invoke(... cli::array <System::Object ^> ^ arguments);
public override object Invoke (params object[] arguments);
override this.Invoke : obj[] -> obj
Public Overrides Function Invoke (ParamArray arguments As Object()) As Object

Parameters

arguments
Object[]

Arguments to the method.

Returns

Return value from the method.

Exceptions

If arguments is null.

For exceptions invoking the Script or if there is no Runspace to run the script.

Applies to