TS/RD Client Error Lookup Script

I wrote this for rapid description lookup whenever someone gives me a TSAC/Remote Desktop client error code; not very exciting, but it keeps you from having to memorize codes.



'TsErrorLookup.vbs

TsError = InputBox("Enter a legacy TS error code", _
"TS Error Lookup")

Meaning = LegacyTSError(TsError)

MsgBox "Error  #" & TsError & ":" & vbCrLf _
 & LegacyTSError(TsError), 0, "TS Error Meaning"

Function LegacyTSError(TsErrorCode)
' Returns meaning of TS client error code on
' slightly older TS Clients.
Dim meaning
Select Case TsErrorCode
Case 0 meaning = "No information is available."
Case 1 meaning = "Local disconnection. This is not an error code."
Case 2 meaning = _
"Remote disconnection by user. This is not an error code."
Case 3 meaning = _
"Remote disconnection by server. This is not an error code."
Case 260 meaning = "DNS name lookup failure."
Case 262 meaning = "Out of memory."
Case 264 meaning = "Connection timed out."
Case 516 meaning = "WinSock socket connect failure."
Case 518 meaning = "Out of memory."
Case 520 meaning = "Host not found error."
Case 772 meaning = "WinSock send call failure."
Case 774 meaning = "Out of memory."
Case 776 meaning = "Invalid IP address specified."
Case 1028 meaning = "WinSock recv call failure."
Case 1030 meaning = "Invalid security data."
Case 1032 meaning = "Internal error."
Case 1286 meaning = "Invalid encryption method specified."
Case 1288 meaning = "DNS lookup failed."
Case 1540 meaning = "GetHostByName call failed."
Case 1542 meaning = "Invalid server security data."
Case 1544 meaning = "Internal timer error."
Case 1796 meaning = "Timeout occurred."
Case 1798 meaning = "Failed to unpack server certificate."
Case 2052 meaning = "Bad IP address specified."
Case 2056 meaning = "Internal security error."
Case 2308 meaning = "Socket closed."
Case 2310 meaning = "Internal security error."
Case 2312 meaning = "Licensing timeout."
Case 2566 meaning = "Internal security error."
Case 2822 meaning = "Encryption error."
Case 3078 meaning = "Decryption error."
Case Else meaning = "Cause unavailable for error " & TsErrorCode
End Select
LegacyTSError = meaning
End Function