Cmdlet.WriteObject Cmdlet.WriteObject Cmdlet.WriteObject Cmdlet.WriteObject Cmdlet.WriteObject Cmdlet.WriteObject Method

Definition

Overloads

WriteObject(Object) WriteObject(Object) WriteObject(Object) WriteObject(Object) WriteObject(Object) WriteObject(Object)

Writes the object to the output pipe.

WriteObject(Object, Boolean) WriteObject(Object, Boolean) WriteObject(Object, Boolean) WriteObject(Object, Boolean) WriteObject(Object, Boolean) WriteObject(Object, Boolean)

Writes one or more objects to the output pipe. If the object is a collection and the enumerateCollection flag is true, the objects in the collection will be written individually.

WriteObject(Object) WriteObject(Object) WriteObject(Object) WriteObject(Object) WriteObject(Object) WriteObject(Object)

Writes the object to the output pipe.

public:
 void WriteObject(System::Object ^ sendToPipeline);
public:
 void WriteObject(Platform::Object ^ sendToPipeline);
void WriteObject(winrt::Windows::Foundation::IInspectable const & sendToPipeline);
public void WriteObject (object sendToPipeline);
member this.WriteObject : obj -> unit
Public Sub WriteObject (sendToPipeline As Object)
Parameters
sendToPipeline
Object Object Object Object Object Object

The object that needs to be written. This will be written as a single object, even if it is an enumeration.

Exceptions

The pipeline has already been terminated, or was terminated during the execution of this method. The Cmdlet should generally just allow PipelineStoppedException to percolate up to the caller of ProcessRecord etc.

Not permitted at this time or from this thread. WriteObject may only be called during a call to this Cmdlet's implementation of ProcessRecord, BeginProcessing or EndProcessing, and only from that thread.

See Also

WriteObject(Object, Boolean) WriteObject(Object, Boolean) WriteObject(Object, Boolean) WriteObject(Object, Boolean) WriteObject(Object, Boolean) WriteObject(Object, Boolean)

Writes one or more objects to the output pipe. If the object is a collection and the enumerateCollection flag is true, the objects in the collection will be written individually.

public:
 void WriteObject(System::Object ^ sendToPipeline, bool enumerateCollection);
public:
 void WriteObject(Platform::Object ^ sendToPipeline, bool enumerateCollection);
void WriteObject(winrt::Windows::Foundation::IInspectable const & sendToPipeline, bool enumerateCollection);
public void WriteObject (object sendToPipeline, bool enumerateCollection);
member this.WriteObject : obj * bool -> unit
Public Sub WriteObject (sendToPipeline As Object, enumerateCollection As Boolean)
Parameters
sendToPipeline
Object Object Object Object Object Object

The object that needs to be written to the pipeline.

enumerateCollection
Boolean Boolean Boolean Boolean Boolean Boolean

true if the collection should be enumerated

Exceptions

The pipeline has already been terminated, or was terminated during the execution of this method. The Cmdlet should generally just allow PipelineStoppedException to percolate up to the caller of ProcessRecord etc.

Not permitted at this time or from this thread. WriteObject may only be called during a call to this Cmdlet's implementation of ProcessRecord, BeginProcessing or EndProcessing, and only from that thread.

See Also

Applies to