ICommandRuntime.WriteProgress Method

Definition

Overloads

WriteProgress(ProgressRecord)

Called by the cmdlet to display progress information.

WriteProgress(Int64, ProgressRecord)

Displays progress output if enabled.

WriteProgress(ProgressRecord)

Called by the cmdlet to display progress information.

public:
 void WriteProgress(System::Management::Automation::ProgressRecord ^ progressRecord);
public void WriteProgress (System.Management.Automation.ProgressRecord progressRecord);
[System.Runtime.CompilerServices.NullableContext(1)]
public void WriteProgress (System.Management.Automation.ProgressRecord progressRecord);
abstract member WriteProgress : System.Management.Automation.ProgressRecord -> unit
[<System.Runtime.CompilerServices.NullableContext(1)>]
abstract member WriteProgress : System.Management.Automation.ProgressRecord -> unit
Public Sub WriteProgress (progressRecord As ProgressRecord)

Parameters

progressRecord
ProgressRecord

Progress information.

Attributes

Remarks

Use WriteProgress to display progress information about the activity of your Task, when the operation of your Task could potentially take a long time.

By default, progress output will be displayed, although this can be configured with the ProgressPreference shell variable.

The implementation of the API should display these progress records in a fashion appropriate for the application. For example, a GUI application would implement this as a progress bar of some sort.

See also

Applies to

WriteProgress(Int64, ProgressRecord)

Displays progress output if enabled.

public:
 void WriteProgress(long sourceId, System::Management::Automation::ProgressRecord ^ progressRecord);
public void WriteProgress (long sourceId, System.Management.Automation.ProgressRecord progressRecord);
[System.Runtime.CompilerServices.NullableContext(1)]
public void WriteProgress (long sourceId, System.Management.Automation.ProgressRecord progressRecord);
abstract member WriteProgress : int64 * System.Management.Automation.ProgressRecord -> unit
[<System.Runtime.CompilerServices.NullableContext(1)>]
abstract member WriteProgress : int64 * System.Management.Automation.ProgressRecord -> unit
Public Sub WriteProgress (sourceId As Long, progressRecord As ProgressRecord)

Parameters

sourceId
Int64

Identifies which command is reporting progress

progressRecord
ProgressRecord

Progress status to be displayed

Attributes

Remarks

The implementation of the API should display these progress records in a fashion appropriate for the application. For example, a GUI application would implement this as a progress bar of some sort.

Applies to