Uncategorized · March 9, 2021 0

Translating Windows Error codes without any tools

Hi there,

As a Windows administrator, I often come across error codes that need translating into their more friendly descriptions. There are a number of methods to return the friendly descriptions, here I will show what and where to use

if the error code is written in decimal code then you can use net helpmsg followed by the error number as explained below

if the error code is written in hexadecimal like (0x643) then there is a PowerShell .Net namespace to use. Just write [componentModel.Win32Exception] followed by the hexadecimal name error as shown below

NOW, lets go further and get a real challenge 😉 and show you how to work it out. In my event viewer i scoped an error

well, as you might have noticed 0xC00000D4 is not decimal and thus we can only try the [componentModel.Win32Exception] method. However, if you do that you will get no result.

the workaround would be converting 0xC00000D4 to decimal; for that I use [convert]::ToString(0xC00000D4) as seen below

next, and before using net helpmsg we have to manipulate the above output to make use only of the last 4 digits from the right side. for that I wrote this code

$errorinDecimal = [Convert]::ToString(0xC00000D4,10)
$errorinDecimal = $errorinDecimal.Substring( $errorinDecimal. length -4,4)

below you see the code you can run in PS to translate any code

$errorinDecimal = [Convert]::ToString(0xC00000D4,10)
$errorinDecimal = $errorinDecimal.Substring( $errorinDecimal. length -4,4)
net helpmsg $errorinDecimal

Cool : ) feel free to use the code and translate.

You might also be interested in the Microsoft Error Lookup tool here

Jaber

Close Bitnami banner
Bitnami