共用方式為


Pipeline Class

Definition

Defines a class which can be used to invoke a pipeline of commands.

public ref class Pipeline abstract : IDisposable
public abstract class Pipeline : IDisposable
type Pipeline = class
    interface IDisposable
Public MustInherit Class Pipeline
Implements IDisposable
Inheritance
Pipeline
Implements

Properties

Commands

Gets the collection of commands for this pipeline.

Error

Gets the error output reader for this pipeline.

HadErrors

True if pipeline execution encountered and error. It will always be true if _reason is non-null since an exception occurred. For other error types, It has to be set manually.

Input

Gets input writer for this pipeline.

InstanceId

Gets the unique identifier for this pipeline. This identifier is unique with in the scope of Runspace.

IsNested

Gets the property which indicates if this pipeline is nested.

Output

Gets the output reader for this pipeline.

PipelineStateInfo

Gets Info about current state of the pipeline.

Runspace

Gets the runspace this pipeline is created on.

SetPipelineSessionState

If this property is true, SessionState is updated for this pipeline state.

Methods

Connect()

Connects synchronously to a running command on a remote server. The pipeline object must be in the disconnected state.

ConnectAsync()

Connects asynchronously to a running command on a remote server.

Copy()

Creates a new Pipeline that is a copy of the current instance.

Dispose()

Disposes the pipeline. If pipeline is running, dispose first stops the pipeline.

Dispose(Boolean)

Protected dispose which can be overridden by derived classes.

Invoke()

Invoke the pipeline, synchronously, returning the results as an array of objects.

Invoke(IEnumerable)

Invoke the pipeline, synchronously, returning the results as an array of objects.

InvokeAsync()

Invoke the pipeline asynchronously.

Stop()

Synchronous call to stop the running pipeline.

StopAsync()

Asynchronous call to stop the running pipeline.

Events

StateChanged

Event raised when Pipeline's state changes.

Applies to