PowerShell.Invoke PowerShell.Invoke PowerShell.Invoke Method

Definition

Overloads

Invoke(IEnumerable, PSInvocationSettings) Invoke(IEnumerable, PSInvocationSettings) Invoke(IEnumerable, PSInvocationSettings)

Invoke the Command synchronously and return the output PSObject collection.

Invoke(IEnumerable) Invoke(IEnumerable) Invoke(IEnumerable)

Invoke the Command synchronously and return the output PSObject collection.

Invoke() Invoke() Invoke()

Invoke the Command synchronously and return the output PSObject collection.

Invoke<T>() Invoke<T>() Invoke<T>()

Invoke the Command synchronously and return the output.

Invoke<T>(IEnumerable) Invoke<T>(IEnumerable) Invoke<T>(IEnumerable)

Invoke the Command synchronously and return the output.

Invoke<T>(IEnumerable, IList<T>) Invoke<T>(IEnumerable, IList<T>) Invoke<T>(IEnumerable, IList<T>)

Invoke the Command synchronously and collect output data into the buffer output

Invoke<T>(IEnumerable, PSInvocationSettings) Invoke<T>(IEnumerable, PSInvocationSettings) Invoke<T>(IEnumerable, PSInvocationSettings)

Invoke the Command synchronously and return the output.

Invoke<T>(IEnumerable, IList<T>, PSInvocationSettings) Invoke<T>(IEnumerable, IList<T>, PSInvocationSettings) Invoke<T>(IEnumerable, IList<T>, PSInvocationSettings)

Invoke the Command synchronously and collect output data into the buffer output

Invoke<TInput,TOutput>(PSDataCollection<TInput>, PSDataCollection<TOutput>, PSInvocationSettings) Invoke<TInput,TOutput>(PSDataCollection<TInput>, PSDataCollection<TOutput>, PSInvocationSettings) Invoke<TInput,TOutput>(PSDataCollection<TInput>, PSDataCollection<TOutput>, PSInvocationSettings)

Invoke the Command synchronously and stream output data into the buffer output

Invoke(IEnumerable, PSInvocationSettings) Invoke(IEnumerable, PSInvocationSettings) Invoke(IEnumerable, PSInvocationSettings)

Invoke the Command synchronously and return the output PSObject collection.

public System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject> Invoke (System.Collections.IEnumerable input, System.Management.Automation.PSInvocationSettings settings);
member this.Invoke : System.Collections.IEnumerable * System.Management.Automation.PSInvocationSettings -> System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject>
Public Function Invoke (input As IEnumerable, settings As PSInvocationSettings) As Collection(Of PSObject)
Parameters
input
IEnumerable IEnumerable IEnumerable

Input to the command

Returns

Collection of PSObjects representing output.

Exceptions

Cannot perform the operation because the command is already started.Stop the command and try the operation again. (or) No commands are specified.

The script recursed too deeply into script functions. There is a fixed limit on the depth of recursion.

A CLR security violation occurred. Typically, this happens because the current CLR permissions do not allow adequate reflection access to a cmdlet assembly.

PowerShell.Invoke can throw a variety of exceptions derived from RuntimeException. The most likely of these exceptions are listed below.

One of more parameters or parameter values specified for a cmdlet are not valid, or mandatory parameters for a cmdlet were not specified.

The ActionPreference.Stop or ActionPreference.Inquire policy triggered a terminating error.

The pipeline was terminated asynchronously.

If there is an error generating the metadata for dynamic parameters.

Invoke(IEnumerable) Invoke(IEnumerable) Invoke(IEnumerable)

Invoke the Command synchronously and return the output PSObject collection.

public System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject> Invoke (System.Collections.IEnumerable input);
member this.Invoke : System.Collections.IEnumerable -> System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject>
Public Function Invoke (input As IEnumerable) As Collection(Of PSObject)
Parameters
input
IEnumerable IEnumerable IEnumerable

Input to the command

Returns

Collection of PSObjects representing output.

Exceptions

Cannot perform the operation because the command is already started.Stop the command and try the operation again. (or) No commands are specified.

The script recursed too deeply into script functions. There is a fixed limit on the depth of recursion.

A CLR security violation occurred. Typically, this happens because the current CLR permissions do not allow adequate reflection access to a cmdlet assembly.

PowerShell.Invoke can throw a variety of exceptions derived from RuntimeException. The most likely of these exceptions are listed below.

One of more parameters or parameter values specified for a cmdlet are not valid, or mandatory parameters for a cmdlet were not specified.

The ActionPreference.Stop or ActionPreference.Inquire policy triggered a terminating error.

The pipeline was terminated asynchronously.

If there is an error generating the metadata for dynamic parameters.

Invoke() Invoke() Invoke()

Invoke the Command synchronously and return the output PSObject collection.

public System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject> Invoke ();
member this.Invoke : unit -> System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject>
Public Function Invoke () As Collection(Of PSObject)
Returns

collection of PSObjects.

Exceptions

Cannot perform the operation because the command is already started.Stop the command and try the operation again. (or) No commands are specified.

The script recursed too deeply into script functions. There is a fixed limit on the depth of recursion.

A CLR security violation occurred. Typically, this happens because the current CLR permissions do not allow adequate reflection access to a cmdlet assembly.

PowerShell.Invoke can throw a variety of exceptions derived from RuntimeException. The most likely of these exceptions are listed below.

One of more parameters or parameter values specified for a cmdlet are not valid, or mandatory parameters for a cmdlet were not specified.

The ActionPreference.Stop or ActionPreference.Inquire policy triggered a terminating error.

The pipeline was terminated asynchronously.

If there is an error generating the metadata for dynamic parameters.

Invoke<T>() Invoke<T>() Invoke<T>()

Invoke the Command synchronously and return the output.

public System.Collections.ObjectModel.Collection<T> Invoke<T> ();
member this.Invoke : unit -> System.Collections.ObjectModel.Collection<'T>
Public Function Invoke(Of T) () As Collection(Of T)
Type Parameters
T

Type of output object(s) expected from the command invocation.

Returns
Exceptions

Cannot perform the operation because the command is already started.Stop the command and try the operation again. (or) No commands are specified.

The script recursed too deeply into script functions. There is a fixed limit on the depth of recursion.

A CLR security violation occurred. Typically, this happens because the current CLR permissions do not allow adequate reflection access to a cmdlet assembly.

PowerShell.Invoke can throw a variety of exceptions derived from RuntimeException. The most likely of these exceptions are listed below.

One of more parameters or parameter values specified for a cmdlet are not valid, or mandatory parameters for a cmdlet were not specified.

The ActionPreference.Stop or ActionPreference.Inquire policy triggered a terminating error.

The pipeline was terminated asynchronously.

If there is an error generating the metadata for dynamic parameters.

Invoke<T>(IEnumerable) Invoke<T>(IEnumerable) Invoke<T>(IEnumerable)

Invoke the Command synchronously and return the output.

public System.Collections.ObjectModel.Collection<T> Invoke<T> (System.Collections.IEnumerable input);
member this.Invoke : System.Collections.IEnumerable -> System.Collections.ObjectModel.Collection<'T>
Public Function Invoke(Of T) (input As IEnumerable) As Collection(Of T)
Type Parameters
T

Type of output object(s) expected from the command invocation.

Parameters
input
IEnumerable IEnumerable IEnumerable

Input to the command

Returns
Exceptions

Cannot perform the operation because the command is already started.Stop the command and try the operation again. (or) No commands are specified.

The script recursed too deeply into script functions. There is a fixed limit on the depth of recursion.

A CLR security violation occurred. Typically, this happens because the current CLR permissions do not allow adequate reflection access to a cmdlet assembly.

PowerShell.Invoke can throw a variety of exceptions derived from RuntimeException. The most likely of these exceptions are listed below.

One of more parameters or parameter values specified for a cmdlet are not valid, or mandatory parameters for a cmdlet were not specified.

The ActionPreference.Stop or ActionPreference.Inquire policy triggered a terminating error.

The pipeline was terminated asynchronously.

If there is an error generating the metadata for dynamic parameters.

Invoke<T>(IEnumerable, IList<T>) Invoke<T>(IEnumerable, IList<T>) Invoke<T>(IEnumerable, IList<T>)

Invoke the Command synchronously and collect output data into the buffer output

public void Invoke<T> (System.Collections.IEnumerable input, System.Collections.Generic.IList<T> output);
member this.Invoke : System.Collections.IEnumerable * System.Collections.Generic.IList<'T> -> unit
Public Sub Invoke(Of T) (input As IEnumerable, output As IList(Of T))
Type Parameters
T

Type of output object(s) expected from the command invocation.

Parameters
input
IEnumerable IEnumerable IEnumerable

Input to the command

output
IList<T>

A collection supplied by the user where output is collected.

Exceptions

Cannot perform the operation because the command is already started.Stop the command and try the operation again. (or) No commands are specified.

The script recursed too deeply into script functions. There is a fixed limit on the depth of recursion.

A CLR security violation occurred. Typically, this happens because the current CLR permissions do not allow adequate reflection access to a cmdlet assembly.

PowerShell.Invoke can throw a variety of exceptions derived from RuntimeException. The most likely of these exceptions are listed below.

One of more parameters or parameter values specified for a cmdlet are not valid, or mandatory parameters for a cmdlet were not specified.

The ActionPreference.Stop or ActionPreference.Inquire policy triggered a terminating error.

The pipeline was terminated asynchronously.

If there is an error generating the metadata for dynamic parameters.

Invoke<T>(IEnumerable, PSInvocationSettings) Invoke<T>(IEnumerable, PSInvocationSettings) Invoke<T>(IEnumerable, PSInvocationSettings)

Invoke the Command synchronously and return the output.

public System.Collections.ObjectModel.Collection<T> Invoke<T> (System.Collections.IEnumerable input, System.Management.Automation.PSInvocationSettings settings);
member this.Invoke : System.Collections.IEnumerable * System.Management.Automation.PSInvocationSettings -> System.Collections.ObjectModel.Collection<'T>
Public Function Invoke(Of T) (input As IEnumerable, settings As PSInvocationSettings) As Collection(Of T)
Type Parameters
T

Type of output object(s) expected from the command invocation.

Parameters
input
IEnumerable IEnumerable IEnumerable

Input to the command

Returns
Exceptions

Cannot perform the operation because the command is already started.Stop the command and try the operation again. (or) No commands are specified.

The script recursed too deeply into script functions. There is a fixed limit on the depth of recursion.

A CLR security violation occurred. Typically, this happens because the current CLR permissions do not allow adequate reflection access to a cmdlet assembly.

PowerShell.Invoke can throw a variety of exceptions derived from RuntimeException. The most likely of these exceptions are listed below.

One of more parameters or parameter values specified for a cmdlet are not valid, or mandatory parameters for a cmdlet were not specified.

The ActionPreference.Stop or ActionPreference.Inquire policy triggered a terminating error.

The pipeline was terminated asynchronously.

If there is an error generating the metadata for dynamic parameters.

Invoke<T>(IEnumerable, IList<T>, PSInvocationSettings) Invoke<T>(IEnumerable, IList<T>, PSInvocationSettings) Invoke<T>(IEnumerable, IList<T>, PSInvocationSettings)

Invoke the Command synchronously and collect output data into the buffer output

public void Invoke<T> (System.Collections.IEnumerable input, System.Collections.Generic.IList<T> output, System.Management.Automation.PSInvocationSettings settings);
member this.Invoke : System.Collections.IEnumerable * System.Collections.Generic.IList<'T> * System.Management.Automation.PSInvocationSettings -> unit
Public Sub Invoke(Of T) (input As IEnumerable, output As IList(Of T), settings As PSInvocationSettings)
Type Parameters
T

Type of output object(s) expected from the command invocation.

Parameters
input
IEnumerable IEnumerable IEnumerable

Input to the command

output
IList<T>

A collection supplied by the user where output is collected.

settings
PSInvocationSettings PSInvocationSettings PSInvocationSettings

Invocation Settings to use.

Exceptions

The script recursed too deeply into script functions. There is a fixed limit on the depth of recursion.

A CLR security violation occurred. Typically, this happens because the current CLR permissions do not allow adequate reflection access to a cmdlet assembly.

PowerShell.Invoke can throw a variety of exceptions derived from RuntimeException. The most likely of these exceptions are listed below.

One of more parameters or parameter values specified for a cmdlet are not valid, or mandatory parameters for a cmdlet were not specified.

The ActionPreference.Stop or ActionPreference.Inquire policy triggered a terminating error.

The pipeline was terminated asynchronously.

If there is an error generating the metadata for dynamic parameters.

Invoke<TInput,TOutput>(PSDataCollection<TInput>, PSDataCollection<TOutput>, PSInvocationSettings) Invoke<TInput,TOutput>(PSDataCollection<TInput>, PSDataCollection<TOutput>, PSInvocationSettings) Invoke<TInput,TOutput>(PSDataCollection<TInput>, PSDataCollection<TOutput>, PSInvocationSettings)

Invoke the Command synchronously and stream output data into the buffer output

public void Invoke<TInput,TOutput> (System.Management.Automation.PSDataCollection<TInput> input, System.Management.Automation.PSDataCollection<TOutput> output, System.Management.Automation.PSInvocationSettings settings);
member this.Invoke : System.Management.Automation.PSDataCollection<'Input> * System.Management.Automation.PSDataCollection<'Output> * System.Management.Automation.PSInvocationSettings -> unit
Public Sub Invoke(Of TInput, TOutput) (input As PSDataCollection(Of TInput), output As PSDataCollection(Of TOutput), settings As PSInvocationSettings)
Type Parameters
TInput

Type of input object(s) expected from the command invocation.

TOutput

Type of output object(s) expected from the command invocation.

Parameters
input
PSDataCollection<TInput>

Input to the command

output
PSDataCollection<TOutput>

Output of the command.

settings
PSInvocationSettings PSInvocationSettings PSInvocationSettings

Invocation Settings to use.

Exceptions

The script recursed too deeply into script functions. There is a fixed limit on the depth of recursion.

A CLR security violation occurred. Typically, this happens because the current CLR permissions do not allow adequate reflection access to a cmdlet assembly.

PowerShell.Invoke can throw a variety of exceptions derived from RuntimeException. The most likely of these exceptions are listed below.

One of more parameters or parameter values specified for a cmdlet are not valid, or mandatory parameters for a cmdlet were not specified.

The ActionPreference.Stop or ActionPreference.Inquire policy triggered a terminating error.

The pipeline was terminated asynchronously.

If there is an error generating the metadata for dynamic parameters.

Applies to