ErrorCategory Enum
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.
Errors reported by PowerShell will be in one of these categories.
public enum class ErrorCategory
public enum ErrorCategory
type ErrorCategory =
Public Enum ErrorCategory
- Inheritance
-
ErrorCategory
Fields
AuthenticationError | 28 | Could not authenticate the user to the service. Could mean that the credentials are invalid or the authentication system is not functioning properly. |
CloseError | 2 | |
ConnectionError | 27 | The operation depends on a network connection that cannot be established or maintained. |
DeadlockDetected | 4 | |
DeviceError | 3 | |
FromStdErr | 24 | A native command reported an error to its STDERR pipe. |
InvalidArgument | 5 | |
InvalidData | 6 | |
InvalidOperation | 7 | |
InvalidResult | 8 | |
InvalidType | 9 | |
LimitsExceeded | 29 | Internal limits prevent the operation from being executed. |
MetadataError | 10 | |
NotEnabled | 31 | The operation attempted to use functionality that is currently disabled. |
NotImplemented | 11 | |
NotInstalled | 12 | |
NotSpecified | 0 | No error category is specified, or the error category is invalid. |
ObjectNotFound | 13 | Object can not be found (file, directory, computer, system resource, etc.) |
OpenError | 1 | |
OperationStopped | 14 | |
OperationTimeout | 15 | |
ParserError | 17 | |
PermissionDenied | 18 | Operation not permitted. |
ProtocolError | 26 | The contract of a protocol is not being followed. Should not happen with well-behaved components. |
QuotaExceeded | 30 | Controls on the use of traffic or resources prevent the operation from being executed. |
ReadError | 22 | |
ResourceBusy | 19 | |
ResourceExists | 20 | |
ResourceUnavailable | 21 | |
SecurityError | 25 | Used for security exceptions. |
SyntaxError | 16 | |
WriteError | 23 |
Remarks
Do not specify ErrorCategory.NotSpecified when creating an ErrorRecord. Choose the best match from among the other values.