Cmdlet.Invoke Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Invoke() |
Invoke this cmdlet object returning a collection of results. |
Invoke<T>() |
Returns a strongly-typed enumerator for the results of this cmdlet. |
Invoke()
Invoke this cmdlet object returning a collection of results.
public:
System::Collections::IEnumerable ^ Invoke();
public System.Collections.IEnumerable Invoke ();
[System.Runtime.CompilerServices.IteratorStateMachine(typeof(System.Management.Automation.Cmdlet+<Invoke>d__40))]
public System.Collections.IEnumerable Invoke ();
member this.Invoke : unit -> System.Collections.IEnumerable
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(System.Management.Automation.Cmdlet+<Invoke>d__40))>]
member this.Invoke : unit -> System.Collections.IEnumerable
Public Function Invoke () As IEnumerable
Public Iterator Function Invoke () As IEnumerable
Returns
The results that were produced by this class.
- Attributes
Applies to
Invoke<T>()
Returns a strongly-typed enumerator for the results of this cmdlet.
public:
generic <typename T>
System::Collections::Generic::IEnumerable<T> ^ Invoke();
public System.Collections.Generic.IEnumerable<T> Invoke<T> ();
[System.Runtime.CompilerServices.IteratorStateMachine(typeof(System.Management.Automation.Cmdlet+<Invoke>d__41<>))]
public System.Collections.Generic.IEnumerable<T> Invoke<T> ();
member this.Invoke : unit -> seq<'T>
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(System.Management.Automation.Cmdlet+<Invoke>d__41<>))>]
member this.Invoke : unit -> seq<'T>
Public Function Invoke(Of T) () As IEnumerable(Of T)
Public Iterator Function Invoke(Of T) () As IEnumerable(Of T)
Type Parameters
- T
The type returned by the enumerator
Returns
IEnumerable<T>
An instance of the appropriate enumerator.
- Attributes
Exceptions
Thrown when the object returned by the cmdlet cannot be converted to the target type.