Cmdlet.Stopping Property
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.
Is this command stopping?
public:
property bool Stopping { bool get(); };
public:
property bool Stopping { bool get(); };
public bool Stopping { get; }
member this.Stopping : bool
Public ReadOnly Property Stopping As Boolean
Property Value
Remarks
If Stopping is true, many Cmdlet methods will throw PipelineStoppedException.
In general, if a Cmdlet's override implementation of ProcessRecord etc. throws PipelineStoppedException, the best thing to do is to shut down the operation and return to the caller. It is acceptable to not catch PipelineStoppedException and allow the exception to reach ProcessRecord.