Share via


AsyncCmdlet.WriteError Method

This element is introduced in Windows PowerShell 5.0.

Namespace: Microsoft.OneGet.Utility.PowerShell
Assembly: Microsoft.OneGet.Utility.PowerShell (in Microsoft.OneGet.Utility.PowerShell.dll)

Usage

'Usage
Dim instance As AsyncCmdlet
Dim errorRecord As ErrorRecord
Dim returnValue As Task(Of Boolean)

returnValue = instance.WriteError(errorRecord)

Syntax

'Declaration
Public Function WriteError ( _
    errorRecord As ErrorRecord _
) As Task(Of Boolean)
public Task<bool> WriteError (
    ErrorRecord errorRecord
)
public:
Task<bool>^ WriteError (
    ErrorRecord^ errorRecord
)
public Task<boolean> WriteError (
    ErrorRecord errorRecord
)
public function WriteError (
    errorRecord : ErrorRecord
) : Task<boolean>

Parameters

  • errorRecord

Return Value

Returns Task.

Thread Safety

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

Platforms

Target Platforms

See Also

Reference

AsyncCmdlet Class
AsyncCmdlet Members
Microsoft.OneGet.Utility.PowerShell Namespace