PowerShell.EndInvoke Method

Definition

Waits for the pending asynchronous BeginInvoke to complete.

public System.Management.Automation.PSDataCollection<System.Management.Automation.PSObject> EndInvoke (IAsyncResult asyncResult);
Parameters
asyncResult
IAsyncResult

Instance of IAsyncResult returned by BeginInvoke.

Returns

The output buffer created to hold the results of the asynchronous invoke, or null if the caller provided their own buffer.

Exceptions

asyncResult is a null reference.

asyncResult object was not created by calling BeginInvoke on this PowerShell instance.