Displays a human readable error message of Win32 and WinInet error codes
Get-ErrorMessage [-ErrorCode] <Int32> [<CommonParameters>]
Displays a human readable error message of Win32 and WinInet error codes. The command supports short and long error message notations. The commands support both, integer and hex (0x########) forms.
Specifies a Win32/WinInet error code. This parameter supports short and long error code notations.
Short notation: 5
Long notation as hex: 0x80070005
Long notation as integer: -2147024891
Required? | True |
Position? | 0 |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, InformationAction, InformationVariable,
WarningAction, WarningVariable, OutBuffer, PipelineVariable and OutVariable.
For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
Author: Vadims Podans
Blog: https://www.sysadmins.lv
PS C:\> Get-ErrorMessage 5
Displays a text associated with the Win32 error code 5 (Access denied) that is specified in a short notation.
PS C:\> Get-ErrorMessage 0x80070005
Displays a text associated with the Win32 error code 0x8007005 (Access denied) that is specified as a hex.
PS C:\> Get-ErrorMessage -2147024891
Displays a text associated with the Win32 error code -2147024891 (Access denied) that is specified as an integer.