Cmdlet.WriteCommandDetail Method

Writes information to the execution log of the pipeline.


Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation.dll)

'Usage
Dim instance As Cmdlet
Dim text As String

instance.WriteCommandDetail(text)

'Declaration
Public Sub WriteCommandDetail ( _
	text As String _
)
public void WriteCommandDetail (
	String text
)
public function WriteCommandDetail (
	text : String
)

Parameters

text

Text to be written to the execution log.

Exception typeCondition
PipelineStoppedException

The pipeline is stopped. The pipeline was terminated either before the call was made or while the call was in progress. By default, the cmdlet should allow the caller of the processing record method to catch this exception.

Also, if the pipeline was terminated because of ActionPreference.Stop or ActionPreference.Inquire, the command failure will ultimately be ActionPreferenceStopException.

InvalidOperationException

The call cannot be completed at this time or cannot be completed from this thread. For more information, see the following Remarks section.

Use this method to write important information about the execution of the cmdlet to the pipeline execution log. If LogPipelineExecutionDetail is turned on, this information will be written to the Windows PowerShell log under the log category "Pipeline execution detail."

This method can be called only from within the cmdlet implementation of the BeginProcessing, ProcessRecord, and EndProcessing methods and only from that thread. If this call is made from outside these implementations or from another thread, an InvalidOperationException exception is thrown.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

 

Target Platforms

Windows Developer Preview, Windows Server Developer Preview

Send comments about this topic to Microsoft.
Show:
© 2014 Microsoft