Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns a formatted string containing the text of an error number. This method performs the same operation as the Winrm command-line winrm helpmsg error number.
Syntax
HRESULT GetErrorMessage(
[in] DWORD errorNumber,
[out] BSTR *errorMessage
);
Parameters
[in] errorNumber
Error message number in decimal or hexadecimal from WinRM, WinHTTP, or other operating system components.
[out] errorMessage
Error message string formatted like messages returned from the Winrm command.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The corresponding scripting method is WSMan.GetErrorMessage.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows Vista |
| Minimum supported server | Windows Server 2008 |
| Target Platform | Windows |
| Header | wsmandisp.h |
| Library | WSManDisp.tlb |
| DLL | WSMAuto.dll |