PowerShell.Invoke
Method
Definition
Overloads
| Invoke(IEnumerable, PSInvocationSettings) |
Invoke the Command synchronously and return the output PSObject collection. |
| Invoke(IEnumerable) |
Invoke the Command synchronously and return the output PSObject collection. |
| Invoke() |
Invoke the Command synchronously and return the output PSObject collection. |
| Invoke<T>() |
Invoke the Command synchronously and return the output. |
| Invoke<T>(IEnumerable) |
Invoke the Command synchronously and return the output. |
| Invoke<T>(IEnumerable, IList<T>) |
Invoke the Command synchronously and collect
output data into the buffer |
| Invoke<T>(IEnumerable, PSInvocationSettings) |
Invoke the Command synchronously and return the output. |
| Invoke<T>(IEnumerable, IList<T>, PSInvocationSettings) |
Invoke the Command synchronously and collect
output data into the buffer |
| Invoke<TInput,TOutput>(PSDataCollection<TInput>, PSDataCollection<TOutput>, PSInvocationSettings) |
Invoke the Command synchronously and stream
output data into the buffer |
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);
- input
- IEnumerable
Input to the command
- settings
- PSInvocationSettings
Invocation Settings
Collection of PSObjects representing output.
Object is disposed.
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 reflextion access to a cmdlet assembly.
The thread in which the command was executing was aborted.
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.
A cmdlet generated a terminating error.
A provider generated a terminating error.
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 the Command synchronously and return the output PSObject collection.
public System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject> Invoke (System.Collections.IEnumerable input);
- input
- IEnumerable
Input to the command
Collection of PSObjects representing output.
Object is disposed.
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 reflextion access to a cmdlet assembly.
The thread in which the command was executing was aborted.
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.
A cmdlet generated a terminating error.
A provider generated a terminating error.
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 the Command synchronously and return the output PSObject collection.
public System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject> Invoke ();
collection of PSObjects.
Object is disposed.
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 reflextion access to a cmdlet assembly.
The thread in which the command was executing was aborted.
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.
A cmdlet generated a terminating error.
A provider generated a terminating error.
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 the Command synchronously and return the output.
public System.Collections.ObjectModel.Collection<T> Invoke<T> ();
- T
Type of output object(s) expected from the command invocation.
Object is disposed.
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 reflextion access to a cmdlet assembly.
The thread in which the command was executing was aborted.
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.
A cmdlet generated a terminating error.
A provider generated a terminating error.
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 the Command synchronously and return the output.
public System.Collections.ObjectModel.Collection<T> Invoke<T> (System.Collections.IEnumerable input);
- T
Type of output object(s) expected from the command invocation.
- input
- IEnumerable
Input to the command
Object is disposed.
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 reflextion access to a cmdlet assembly.
The thread in which the command was executing was aborted.
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.
A cmdlet generated a terminating error.
A provider generated a terminating error.
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 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);
- T
Type of output object(s) expected from the command invocation.
- input
- IEnumerable
Input to the command
- output
- IList<T>
A collection supplied by the user where output is collected.
output cannot be null.
Object is disposed.
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 reflextion access to a cmdlet assembly.
The thread in which the command was executing was aborted.
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.
A cmdlet generated a terminating error.
A provider generated a terminating error.
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 the Command synchronously and return the output.
public System.Collections.ObjectModel.Collection<T> Invoke<T> (System.Collections.IEnumerable input, System.Management.Automation.PSInvocationSettings settings);
- T
Type of output object(s) expected from the command invocation.
- input
- IEnumerable
Input to the command
- settings
- PSInvocationSettings
Invocation Settings
Object is disposed.
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 reflextion access to a cmdlet assembly.
The thread in which the command was executing was aborted.
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.
A cmdlet generated a terminating error.
A provider generated a terminating error.
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 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);
- T
Type of output object(s) expected from the command invocation.
- input
- IEnumerable
Input to the command
- output
- IList<T>
A collection supplied by the user where output is collected.
- settings
- PSInvocationSettings
Invocation Settings to use.
output cannot be null.
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 reflextion access to a cmdlet assembly.
The thread in which the command was executing was aborted.
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.
A cmdlet generated a terminating error.
A provider generated a terminating error.
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 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);
- TInput
Type of input object(s) expected from the command invocation.
- TOutput
Type of output object(s) expected from the command invocation.
- input
- PSDataCollection<TInput>
Input to the command
- output
- PSDataCollection<TOutput>
Output of the command.
- settings
- PSInvocationSettings
Invocation Settings to use.
output cannot be null.
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 reflextion access to a cmdlet assembly.
The thread in which the command was executing was aborted.
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.
A cmdlet generated a terminating error.
A provider generated a terminating error.
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.