Share via


GPStatusMessage.ErrorCode Property

 

Gets the error that occurred during the operation.

Namespace:   Microsoft.GroupPolicy
Assembly:  Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)

Syntax

public int ErrorCode { get; }
public:
property int ErrorCode {
    int get();
}
member ErrorCode : int with get
Public ReadOnly Property ErrorCode As Integer

Property Value

Type: System.Int32

Returns Int32. An HRESULT.

Remarks

The error that occurred during the GPMC operation. If the operation was interacting with another system component, the error code is typically one returned by that component. Usually, this is the first error GPMC encounters while executing the operation. This error code is internally mapped to the operation error code returned by the OperationCode property.

For example, if GPMC calls LookupAccountSid while resolving the destination of a security group in a GPO import operation, and LookupAccountSid returns E_ACCESSDENIED, then the error code for the message will be E_ACCESSDENIED and the operation code of the message will be STATUS_ENTRY_DEST_UNRESOLVED.

See Also

GPStatusMessage Class
Microsoft.GroupPolicy Namespace

Return to top