Udostępnij za pośrednictwem


Cmdlet.Invoke Method

Definition

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

An instance of the appropriate enumerator.

Attributes

Exceptions

Thrown when the object returned by the cmdlet cannot be converted to the target type.

Applies to