diff --git a/PInvoke/WsmSvc/WSMan.cs b/PInvoke/WsmSvc/WSMan.cs
index 74738396..b747892e 100644
--- a/PInvoke/WsmSvc/WSMan.cs
+++ b/PInvoke/WsmSvc/WSMan.cs
@@ -7,8 +7,7 @@ public static partial class WsmSvc
public const string WSMAN_CMDSHELL_OPTION_CODEPAGE = "WINRS_CODEPAGE";
///
- /// Option name used with WSManRunShellCommand API to indicate that the client side mode of standard input is Console; default
- /// implies Pipe.
+ /// Option name used with WSManRunShellCommand API to indicate that the client side mode of standard input is Console; default implies Pipe.
///
public const string WSMAN_CMDSHELL_OPTION_CONSOLEMODE_STDIN = "WINRS_CONSOLEMODE_STDIN";
@@ -46,69 +45,62 @@ public static partial class WsmSvc
/// Specifies the context that was returned by a call to WSManPluginStartup. This parameter represents a specific application
/// initialization of a WinRM plug-in.
///
- ///
+ ///
+ /// A pointer to the WSMAN_SENDER_DETAILS structure that specifies the identification information of the user.
+ ///
/// Reserved for future use. Must be set to zero.
///
/// Represents the operation that is being performed. This parameter can be one of the following values:
- /// Get
+ /// Get
/// WSManOperationGet
- /// Put
+ /// Put
/// WSManOperationPut
- /// Create
+ /// Create
/// WSManOperationCreate
- /// Delete
+ /// Delete
/// WSManOperationDelete
- /// Enumerate
+ /// Enumerate
/// WSManOperationEnumerate
- /// Subscribe
+ /// Subscribe
/// WSManOperationSubscribe
- /// Shell
+ /// Shell
/// WSManOperationShell
- /// Command
+ /// Command
/// WSManOperationCommand
- /// Invoke
+ /// Invoke
/// WSManOperationInvoke
///
///
/// Specifies the action of the request received. This parameter can be one of the following values:
- /// Get
- /// http://schemas.xmlsoap.org/ws/2004/09/transfer/Get
- /// Put
- /// http://schemas.xmlsoap.org/ws/2004/09/transfer/Put
- /// Create
- /// http://schemas.xmlsoap.org/ws/2004/09/transfer/Create
- /// Note Shell creation will appear as Create.
- /// Delete
- /// http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete
- /// Enumerate
- /// http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate
- /// Subscribe
- /// http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe
- /// Command
- /// http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Command
- /// Invoke
- /// This operation will have a custom string.
+ /// Get
http://schemas.xmlsoap.org/ws/2004/09/transfer/Get
+ /// Put
http://schemas.xmlsoap.org/ws/2004/09/transfer/Put
+ /// Create
http://schemas.xmlsoap.org/ws/2004/09/transfer/Create
+ /// Note Shell creation will appear as Create.
Delete
http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete
+ /// Enumerate
http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate
+ /// Subscribe
http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe
+ /// Command
http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Command
+ /// Invoke
This operation will have a custom string.
///
/// Specifies the resource URI of the inbound operation.
/// None
///
- /// The plug-in must call WSManPluginAuthzOperationComplete to report either that the user was successfully authorized to perform
- /// the operation with NO_ERROR or that the user was not authorized with ERROR_ACCESS_DENIED. All other errors report
- /// a failure to the client, but no specific information is reported.
+ /// The plug-in must call WSManPluginAuthzOperationComplete to report either that the user was successfully authorized to perform the
+ /// operation with NO_ERROR or that the user was not authorized with ERROR_ACCESS_DENIED. All other errors report a failure
+ /// to the client, but no specific information is reported.
///
- // https://docs.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_authorize_operation
- // WSMAN_PLUGIN_AUTHORIZE_OPERATION WsmanPluginAuthorizeOperation; void WsmanPluginAuthorizeOperation( PVOID pluginContext,
- // WSMAN_SENDER_DETAILS *senderDetails, DWORD flags, DWORD operation, PCWSTR action, PCWSTR resourceUri ) {...}
- [UnmanagedFunctionPointer(CallingConvention.Winapi)]
+ // https://learn.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_authorize_operation WSMAN_PLUGIN_AUTHORIZE_OPERATION
+ // WsmanPluginAuthorizeOperation; void WsmanPluginAuthorizeOperation( [in] PVOID pluginContext, [in] WSMAN_SENDER_DETAILS *senderDetails,
+ // [in] DWORD flags, [in] DWORD operation, [in] PCWSTR action, [in] PCWSTR resourceUri ) {...}
[PInvokeData("wsman.h", MSDNShortId = "NC:wsman.WSMAN_PLUGIN_AUTHORIZE_OPERATION")]
+ [UnmanagedFunctionPointer(CallingConvention.Winapi, SetLastError = false)]
public delegate void WSMAN_PLUGIN_AUTHORIZE_OPERATION([In] IntPtr pluginContext, in WSMAN_SENDER_DETAILS senderDetails,
[Optional] uint flags, uint operation, [MarshalAs(UnmanagedType.LPWStr)] string action,
[MarshalAs(UnmanagedType.LPWStr)] string resourceUri);
///
///
- /// Retrieves quota information for the user after a connection has been authorized. This method will be called only if the
- /// configuration specifies that quotas are enabled within the authorization plug-in.
+ /// Retrieves quota information for the user after a connection has been authorized. This method will be called only if the configuration
+ /// specifies that quotas are enabled within the authorization plug-in.
///
/// The DLL entry point name for this method must be WSManPluginAuthzQueryQuota.
///
@@ -116,25 +108,27 @@ public static partial class WsmSvc
/// Specifies the context that was returned by a call to WSManPluginStartup. This parameter represents a specific application
/// initialization of a WinRM plug-in.
///
- ///
+ ///
+ /// A pointer to the WSMAN_SENDER_DETAILS structure that specifies the identification information of the user.
+ ///
/// Reserved for future use. Must be zero.
/// None
///
///
- /// The quota is queried on the first call by a particular user and will not be requeried until after the user record times out due
- /// to an idle time-out of activity or until a system-wide configuration period is exceeded.
+ /// The quota is queried on the first call by a particular user and will not be requeried until after the user record times out due to an
+ /// idle time-out of activity or until a system-wide configuration period is exceeded.
///
///
- /// The plug-in must call the WSManPluginAuthzQueryQuotaComplete function to terminate the operation whether or not the plug-in can
- /// carry out the request. If successful, the plug-in should give a set of quota information that is relevant for this particular
- /// user. If the plug-in fails to process the request for any reason, an appropriate error should be recorded through the callback
- /// method and the error will get propagated back to the client as a Simple Object Access Protocol (SOAP) fault if possible;
- /// otherwise, the error will be an empty HTTP 500 status error.
+ /// The plug-in must call the WSManPluginAuthzQueryQuotaComplete function to terminate the operation whether or not the plug-in can carry
+ /// out the request. If successful, the plug-in should give a set of quota information that is relevant for this particular user. If the
+ /// plug-in fails to process the request for any reason, an appropriate error should be recorded through the callback method and the
+ /// error will get propagated back to the client as a Simple Object Access Protocol (SOAP) fault if possible; otherwise, the error will
+ /// be an empty HTTP 500 status error.
///
///
- // https://docs.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_authorize_query_quota
- // WSMAN_PLUGIN_AUTHORIZE_QUERY_QUOTA WsmanPluginAuthorizeQueryQuota; void WsmanPluginAuthorizeQueryQuota( PVOID pluginContext,
- // WSMAN_SENDER_DETAILS *senderDetails, DWORD flags ) {...}
+ // https://learn.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_authorize_query_quota
+ // WSMAN_PLUGIN_AUTHORIZE_QUERY_QUOTA WsmanPluginAuthorizeQueryQuota; void WsmanPluginAuthorizeQueryQuota( [in] PVOID pluginContext, [in]
+ // WSMAN_SENDER_DETAILS *senderDetails, [in] DWORD flags ) {...}
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[PInvokeData("wsman.h", MSDNShortId = "NC:wsman.WSMAN_PLUGIN_AUTHORIZE_QUERY_QUOTA")]
public delegate void WSMAN_PLUGIN_AUTHORIZE_QUERY_QUOTA(IntPtr pluginContext, in WSMAN_SENDER_DETAILS senderDetails, uint flags);
@@ -142,40 +136,40 @@ public static partial class WsmSvc
///
///
/// Releases the context that a plug-in reports from either WSManPluginAuthzUserComplete or WSManPluginAuthzOperationComplete. For a
- /// particular user, the context reported for both calls is allowed to be the same, as long as the plug-in infrastructure handles
- /// the scenario appropriately. This method is synchronous, and there are no callbacks that are called as a result.
+ /// particular user, the context reported for both calls is allowed to be the same, as long as the plug-in infrastructure handles the
+ /// scenario appropriately. This method is synchronous, and there are no callbacks that are called as a result.
///
/// This method will be called under the following scenarios:
///
/// -
- ///
- /// After the operation is complete, the WSManPluginAuthzOperationComplete context is released. For some operations, such as get,
- /// the context will be released after the response is sent for the get operation. For more complex operations, such as enumeration,
- /// the context will not be released until the enumeration has completed.
- ///
+ ///
+ /// After the operation is complete, the WSManPluginAuthzOperationComplete context is released. For some operations, such as get, the
+ /// context will be released after the response is sent for the get operation. For more complex operations, such as enumeration, the
+ /// context will not be released until the enumeration has completed.
+ ///
///
/// -
- ///
- /// When the user record times out due to inactivity, the WSManPluginAuthzUser method will be called again the next time a request
- /// comes in for that user.
- ///
+ ///
+ /// When the user record times out due to inactivity, the WSManPluginAuthzUser method will be called again the next time a request comes
+ /// in for that user.
+ ///
///
/// -
- ///
- /// If re-authorization needs to occur, the old context will be released after the new one is acquired. The old context will always
- /// be released regardless of whether the authorization succeeds.
- ///
+ ///
+ /// If re-authorization needs to occur, the old context will be released after the new one is acquired. The old context will always be
+ /// released regardless of whether the authorization succeeds.
+ ///
///
///
/// The DLL entry point name for this method must be WSManPluginAuthzReleaseContext.
///
///
- /// Specifies the context that was returned by either WSManPluginAuthzUserComplete or WSManPluginAuthzOperationComplete. If these
- /// methods return no context, this method will not be called.
+ /// Specifies the context that was returned by either WSManPluginAuthzUserComplete or WSManPluginAuthzOperationComplete. If these methods
+ /// return no context, this method will not be called.
///
/// None
- // https://docs.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_authorize_release_context
- // WSMAN_PLUGIN_AUTHORIZE_RELEASE_CONTEXT WsmanPluginAuthorizeReleaseContext; void WsmanPluginAuthorizeReleaseContext( PVOID
+ // https://learn.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_authorize_release_context
+ // WSMAN_PLUGIN_AUTHORIZE_RELEASE_CONTEXT WsmanPluginAuthorizeReleaseContext; void WsmanPluginAuthorizeReleaseContext( [in] PVOID
// userAuthorizationContext ) {...}
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[PInvokeData("wsman.h", MSDNShortId = "NC:wsman.WSMAN_PLUGIN_AUTHORIZE_RELEASE_CONTEXT")]
@@ -183,14 +177,14 @@ public static partial class WsmSvc
///
///
- /// Authorizes a connection. The plug-in should verify that this user is allowed to perform any operations. If the user is allowed
- /// to perform operations, the plug-in must report a success. If the user is not allowed to carry out any type of operation, a
- /// failure must be returned.
+ /// Authorizes a connection. The plug-in should verify that this user is allowed to perform any operations. If the user is allowed to
+ /// perform operations, the plug-in must report a success. If the user is not allowed to carry out any type of operation, a failure must
+ /// be returned.
///
///
- /// Every new connection does not need to be authorized. After a user has been authorized to connect, a user record is created to
- /// track the activities of the user. While that record exists, all new connections will automatically be authorized. The user
- /// record will time-out after a configurable amount of time after no activity is detected.
+ /// Every new connection does not need to be authorized. After a user has been authorized to connect, a user record is created to track
+ /// the activities of the user. While that record exists, all new connections will automatically be authorized. The user record will
+ /// time-out after a configurable amount of time after no activity is detected.
///
/// The DLL entry point name for this method must be WSManPluginAuthzUser.
///
@@ -198,21 +192,23 @@ public static partial class WsmSvc
/// Specifies the context that was returned by a call to WSManPluginStartup. This parameter represents a specific application
/// initialization of a WinRM plug-in.
///
- ///
+ ///
+ /// A pointer to the WSMAN_SENDER_DETAILS structure that specifies the identification information of the user to be authorized.
+ ///
/// Reserved for future use. Must be set to zero.
/// None
///
- /// The plug-in must call WSManPluginAuthzUserComplete to report either that the user was successfully authorized with
- /// NO_ERROR or that the user was not authorized with ERROR_ACCESS_DENIED. An ERROR_WSMAN_REDIRECT_REQUIRED
- /// error should be reported if an HTTP redirect is required for this user, and the new HTTP URI should be recorded in
- /// extendedErrorInformation of the WSManPluginAuthzUserComplete method. All other errors report a failure to the client, but
- /// no specific information is reported.
+ /// The plug-in must call WSManPluginAuthzUserComplete to report either that the user was successfully authorized with NO_ERROR or
+ /// that the user was not authorized with ERROR_ACCESS_DENIED. An ERROR_WSMAN_REDIRECT_REQUIRED error should be reported if
+ /// an HTTP redirect is required for this user, and the new HTTP URI should be recorded in extendedErrorInformation of the
+ /// WSManPluginAuthzUserComplete method. All other errors report a failure to the client, but no specific information is reported.
///
- // https://docs.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_authorize_user WSMAN_PLUGIN_AUTHORIZE_USER
- // WsmanPluginAuthorizeUser; void WsmanPluginAuthorizeUser( PVOID pluginContext, WSMAN_SENDER_DETAILS *senderDetails, DWORD flags ) {...}
+ // https://learn.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_authorize_user WSMAN_PLUGIN_AUTHORIZE_USER
+ // WsmanPluginAuthorizeUser; void WsmanPluginAuthorizeUser( [in] PVOID pluginContext, [in] WSMAN_SENDER_DETAILS *senderDetails, [in]
+ // DWORD flags ) {...}
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[PInvokeData("wsman.h", MSDNShortId = "NC:wsman.WSMAN_PLUGIN_AUTHORIZE_USER")]
- public delegate void WSMAN_PLUGIN_AUTHORIZE_USER(IntPtr pluginContext, in WSMAN_SENDER_DETAILS senderDetails, uint flags);
+ public delegate void WSMAN_PLUGIN_AUTHORIZE_USER(IntPtr pluginContext, in WSMAN_SENDER_DETAILS senderDetails, uint flags = 0);
///
///
@@ -221,31 +217,37 @@ public static partial class WsmSvc
///
/// The DLL entry point name must be WSManPluginCommand.
///
- ///
+ ///
+ /// A pointer to a WSMAN_PLUGIN_REQUEST structure that specifies the resource URI, options, locale, shutdown flag, and handle for the request.
+ ///
/// Reserved for future use. Must be set to zero.
/// Specifies the context returned from creating the shell for which this command needs to be associated.
/// Specifies the command line to be run.
- ///
+ ///
+ /// A pointer to a WSMAN_COMMAND_ARG_SET structure that specifies the command-line arguments to be passed to the command.
+ ///
/// None
///
- /// The WinRM (WinRM) plug-in will call the WSManPluginReportContext method to register a command context for the command. All
- /// operations on this command are passed into this context. The context must be valid until the WSManPluginOperationComplete method
- /// is called by the plug-in to indicate that either the command is complete or the shell was shut down. All parameters passed in
- /// are valid until the WinRM plug-in calls WSManPluginOperationComplete.
+ /// The WinRM (WinRM) plug-in will call the WSManPluginReportContext method to register a command context for the command. All operations
+ /// on this command are passed into this context. The context must be valid until the WSManPluginOperationComplete method is called by
+ /// the plug-in to indicate that either the command is complete or the shell was shut down. All parameters passed in are valid until the
+ /// WinRM plug-in calls WSManPluginOperationComplete.
///
- // https://docs.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_command WSMAN_PLUGIN_COMMAND WsmanPluginCommand;
- // void WsmanPluginCommand( WSMAN_PLUGIN_REQUEST *requestDetails, DWORD flags, PVOID shellContext, PCWSTR commandLine,
- // WSMAN_COMMAND_ARG_SET *arguments ) {...}
+ // https://learn.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_command WSMAN_PLUGIN_COMMAND WsmanPluginCommand; void
+ // WsmanPluginCommand( WSMAN_PLUGIN_REQUEST *requestDetails, DWORD flags, PVOID shellContext, PCWSTR commandLine, WSMAN_COMMAND_ARG_SET
+ // *arguments ) {...}
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[PInvokeData("wsman.h", MSDNShortId = "NC:wsman.WSMAN_PLUGIN_COMMAND")]
- public delegate void WSMAN_PLUGIN_COMMAND(in WSMAN_PLUGIN_REQUEST requestDetails, uint flags, IntPtr shellContext,
+ public delegate void WSMAN_PLUGIN_COMMAND(in WSMAN_PLUGIN_REQUEST requestDetails, [Optional] uint flags, IntPtr shellContext,
[MarshalAs(UnmanagedType.LPWStr)] string commandLine, IntPtr arguments);
///
/// Defines the connect callback for a plug-in.
/// The DLL entry point name must be WSManPluginConnect.
///
- ///
+ ///
+ /// A pointer to a WSMAN_PLUGIN_REQUEST structure that specifies the resource URI, options, locale, shutdown flag, and handle for the request.
+ ///
/// Reserved for future use. Must be set to zero.
///
/// Specifies the context returned from creating the shell for which this connection request needs to be associated.
@@ -254,42 +256,49 @@ public static partial class WsmSvc
/// If this request is aimed at a command and not a shell, this is the context returned from the winrm create operation;
/// otherwise, this parameter is NULL.
///
- ///
+ ///
+ /// A pointer to a WSMAN_DATA structure that specifies an optional inbound object that contains extra data for the connection.
+ ///
/// None
- // https://docs.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_connect WSMAN_PLUGIN_CONNECT WsmanPluginConnect;
- // void WsmanPluginConnect( WSMAN_PLUGIN_REQUEST *requestDetails, DWORD flags, PVOID shellContext, PVOID commandContext, WSMAN_DATA
- // *inboundConnectInformation ) {...}
- [UnmanagedFunctionPointer(CallingConvention.Winapi)]
+ // https://learn.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_connect WSMAN_PLUGIN_CONNECT WsmanPluginConnect; void
+ // WsmanPluginConnect( [in] WSMAN_PLUGIN_REQUEST *requestDetails, [in] DWORD flags, [in] PVOID shellContext, [in, optional] PVOID
+ // commandContext, [in, optional] WSMAN_DATA *inboundConnectInformation ) {...}
[PInvokeData("wsman.h", MSDNShortId = "NC:wsman.WSMAN_PLUGIN_CONNECT")]
- public delegate void WSMAN_PLUGIN_CONNECT(in WSMAN_PLUGIN_REQUEST requestDetails, uint flags, IntPtr shellContext,
- IntPtr commandContext, IntPtr inboundConnectInformation);
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
+ public delegate void WSMAN_PLUGIN_CONNECT(in WSMAN_PLUGIN_REQUEST requestDetails, [Optional] uint flags, IntPtr shellContext,
+ [Optional] IntPtr commandContext, [Optional] IntPtr inboundConnectInformation);
///
/// Defines the receive callback for a plug-in. This function is called when an inbound request to receive data is received.
/// The DLL entry point name must be WSManPluginReceive.
///
- ///
+ ///
+ /// A pointer to a WSMAN_PLUGIN_REQUEST structure that specifies the resource URI, options, locale, shutdown flag, and handle for the request.
+ ///
/// Reserved for future use. Must be zero.
/// Specifies the context that was received when the shell was created.
///
/// If this request is aimed at a command and not a shell, this is the context returned from the winrm create operation;
/// otherwise, this parameter is NULL.
///
- ///
+ ///
+ /// A WSMAN_STREAM_ID_SET structure that contains a list of streams for which data is to be received. If this list is empty, all streams
+ /// that were configured in the shell are implied, which means that all streams are available.
+ ///
/// None
///
- /// Based on the client request, the WSMAN_PLUGIN_RECEIVE callback function can be called against the shell and/or the
- /// command. The plug-in calls the WSManPluginReceiveResult method for each piece of data that needs to be sent back to the client.
- /// After all of the data has been sent, the plug-in calls WSManPluginOperationComplete to end the stream. All parameters passed in
- /// are valid until the Windows Remote Management (WinRM) plug-in calls WSManPluginOperationComplete.
+ /// Based on the client request, the WSMAN_PLUGIN_RECEIVE callback function can be called against the shell and/or the command.
+ /// The plug-in calls the WSManPluginReceiveResult method for each piece of data that needs to be sent back to the client. After all of
+ /// the data has been sent, the plug-in calls WSManPluginOperationComplete to end the stream. All parameters passed in are valid until
+ /// the Windows Remote Management (WinRM) plug-in calls WSManPluginOperationComplete.
///
- // https://docs.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_receive WSMAN_PLUGIN_RECEIVE WsmanPluginReceive;
- // void WsmanPluginReceive( WSMAN_PLUGIN_REQUEST *requestDetails, DWORD flags, PVOID shellContext, PVOID commandContext,
- // WSMAN_STREAM_ID_SET *streamSet ) {...}
+ // https://learn.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_receive WSMAN_PLUGIN_RECEIVE WsmanPluginReceive; void
+ // WsmanPluginReceive( WSMAN_PLUGIN_REQUEST *requestDetails, DWORD flags, PVOID shellContext, PVOID commandContext, WSMAN_STREAM_ID_SET
+ // *streamSet ) {...}
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[PInvokeData("wsman.h", MSDNShortId = "NC:wsman.WSMAN_PLUGIN_RECEIVE")]
- public delegate void WSMAN_PLUGIN_RECEIVE(in WSMAN_PLUGIN_REQUEST requestDetails, uint flags, IntPtr shellContext,
- IntPtr commandContext, IntPtr streamSet);
+ public delegate void WSMAN_PLUGIN_RECEIVE(in WSMAN_PLUGIN_REQUEST requestDetails, [Optional] uint flags, IntPtr shellContext,
+ [Optional] IntPtr commandContext, IntPtr streamSet);
///
/// Defines the release command callback for the plug-in. This function is called to delete the plug-in command context.
@@ -306,7 +315,7 @@ public static partial class WsmSvc
// PVOID commandContext ) {...}
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[PInvokeData("wsman.h", MSDNShortId = "NC:wsman.WSMAN_PLUGIN_RELEASE_COMMAND_CONTEXT")]
- public delegate void WSMAN_PLUGIN_RELEASE_COMMAND_CONTEXT(IntPtr shellContext, IntPtr commandContext);
+ public delegate void WSMAN_PLUGIN_RELEASE_COMMAND_CONTEXT(IntPtr shellContext, [Optional] IntPtr commandContext);
///
/// Defines the release shell callback for the plug-in. This function is called to delete the plug-in shell context.
@@ -322,13 +331,15 @@ public static partial class WsmSvc
///
///
- /// Defines the send callback for a plug-in. This function is called for each object that is received from a client. Each object
- /// received causes the callback to be called once. After the data is processed, the Windows Remote Management (WinRM) plug-in calls
+ /// Defines the send callback for a plug-in. This function is called for each object that is received from a client. Each object received
+ /// causes the callback to be called once. After the data is processed, the Windows Remote Management (WinRM) plug-in calls
/// WSManPluginOperationComplete to acknowledge receipt and to allow the next object to be delivered.
///
/// The DLL entry point name must be WSManPluginSend.
///
- ///
+ ///
+ /// A pointer to a WSMAN_PLUGIN_REQUEST structure that specifies the resource URI, options, locale, shutdown flag, and handle for the request.
+ ///
///
/// If this is the last object for the stream, this parameter is set to WSMAN_FLAG_NO_MORE_DATA. Otherwise, it is set to zero.
///
@@ -338,15 +349,17 @@ public static partial class WsmSvc
/// otherwise, this parameter is NULL.
///
/// Specifies the stream that is associated with the inbound object.
- ///
+ ///
+ /// A pointer to a WSMAN_DATA structure that contains data being sent to the specified stream. It is in the form of binary data.
+ ///
/// None
- // https://docs.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_send WSMAN_PLUGIN_SEND WsmanPluginSend; void
+ // https://learn.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_send WSMAN_PLUGIN_SEND WsmanPluginSend; void
// WsmanPluginSend( WSMAN_PLUGIN_REQUEST *requestDetails, DWORD flags, PVOID shellContext, PVOID commandContext, PCWSTR stream,
// WSMAN_DATA *inboundData ) {...}
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[PInvokeData("wsman.h", MSDNShortId = "NC:wsman.WSMAN_PLUGIN_SEND")]
- public delegate void WSMAN_PLUGIN_SEND(in WSMAN_PLUGIN_REQUEST requestDetails, uint flags, IntPtr shellContext,
- IntPtr commandContext, [MarshalAs(UnmanagedType.LPWStr)] string stream, in WSMAN_DATA inboundData);
+ public delegate void WSMAN_PLUGIN_SEND(in WSMAN_PLUGIN_REQUEST requestDetails, [Optional] uint flags, IntPtr shellContext,
+ [Optional] IntPtr commandContext, [MarshalAs(UnmanagedType.LPWStr)] string stream, in WSMAN_DATA inboundData);
///
///
@@ -356,38 +369,42 @@ public static partial class WsmSvc
/// The DLL entry point name must be WSManPluginShell.
///
///
- /// Specifies the context that was returned by a call to the WSManPluginStartup method. This parameter represents a specific
- /// application initialization of a WinRM plug-in.
+ /// Specifies the context that was returned by a call to the WSManPluginStartup method. This parameter represents a specific application
+ /// initialization of a WinRM plug-in.
+ ///
+ ///
+ /// A pointer to a WSMAN_PLUGIN_REQUEST structure that specifies the resource URI, options, locale, shutdown flag, and handle for the request.
///
- ///
/// Reserved for future use. Must be set to zero.
- ///
- ///
+ /// A pointer to a WSMAN_SHELL_STARTUP_INFO structure that contains startup information for the shell.
+ ///
+ /// A pointer to a WSMAN_DATA structure that specifies an optional inbound object that contains extra data for the shell.
+ ///
/// None
///
- /// The WinRM (WinRM) plug-in calls WSManPluginReportContext to register a shell context for the shell. All operations on this shell
- /// pass into this context. If the shell has shut down or the plug-in checks the requestDetails parameter and reports that the
+ /// The WinRM (WinRM) plug-in calls WSManPluginReportContext to register a shell context for the shell. All operations on this shell pass
+ /// into this context. If the shell has shut down or the plug-in checks the requestDetails parameter and reports that the
/// operation was canceled, the plug-in should call WSManPluginOperationComplete. All parameters passed in are valid until the WinRM
/// plug-in calls WSManPluginOperationComplete.
///
- // https://docs.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_shell WSMAN_PLUGIN_SHELL WsmanPluginShell; void
+ // https://learn.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_shell WSMAN_PLUGIN_SHELL WsmanPluginShell; void
// WsmanPluginShell( PVOID pluginContext, WSMAN_PLUGIN_REQUEST *requestDetails, DWORD flags, WSMAN_SHELL_STARTUP_INFO *startupInfo,
// WSMAN_DATA *inboundShellInformation ) {...}
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[PInvokeData("wsman.h", MSDNShortId = "NC:wsman.WSMAN_PLUGIN_SHELL")]
- public delegate void WSMAN_PLUGIN_SHELL(IntPtr pluginContext, in WSMAN_PLUGIN_REQUEST requestDetails, uint flags,
- IntPtr startupInfo, IntPtr inboundShellInformation);
+ public delegate void WSMAN_PLUGIN_SHELL(IntPtr pluginContext, in WSMAN_PLUGIN_REQUEST requestDetails, [Optional] uint flags,
+ IntPtr startupInfo, [Optional] IntPtr inboundShellInformation);
///
///
- /// Defines the shutdown callback for the plug-in. This function is called after all operations have been canceled and before the
- /// Windows Remote Management plug-in DLL is unloaded. All WinRM plug-ins must implement this callback function.
+ /// Defines the shutdown callback for the plug-in. This function is called after all operations have been canceled and before the Windows
+ /// Remote Management plug-in DLL is unloaded. All WinRM plug-ins must implement this callback function.
///
/// The DLL entry point name must be WSManPluginShutdown.
///
///
- /// Specifies the context that was returned by a call to the WSManPluginStartup method. This parameter represents a specific
- /// application initialization of a WinRM plug-in. The shutdown entry point will be called for each application that initialized it.
+ /// Specifies the context that was returned by a call to the WSManPluginStartup method. This parameter represents a specific application
+ /// initialization of a WinRM plug-in. The shutdown entry point will be called for each application that initialized it.
///
/// Reserved for future use. Must be set to zero.
///
@@ -405,20 +422,20 @@ public static partial class WsmSvc
///
///
///
- /// Each successful call to WSManPluginStartup will result in a call to this function before the WinRM plug-in DLL is unloaded. It
- /// is important to ensure that the WinRM plug-in tracks the number of times that this startup entry point is called so that the
- /// plug-in is not shut down prematurely.
+ /// Each successful call to WSManPluginStartup will result in a call to this function before the WinRM plug-in DLL is unloaded. It is
+ /// important to ensure that the WinRM plug-in tracks the number of times that this startup entry point is called so that the plug-in is
+ /// not shut down prematurely.
///
///
/// This function must ensure that all plug-in threads are shut down before it returns. If the plug-in handles only synchronous
- /// operations and all threads report a cancellation result before they return, this function performs only plug-in cleanup.
- /// However, for an asynchronous plug-in, any threads that are used to process the plug-in threads, including the ones that just
- /// reported the cancellation for all operations, need to be completely shut down. If all of the threads are not shut down, crashes
- /// in the DLL might occur because code might be executed after the DLL is unloaded.
+ /// operations and all threads report a cancellation result before they return, this function performs only plug-in cleanup. However, for
+ /// an asynchronous plug-in, any threads that are used to process the plug-in threads, including the ones that just reported the
+ /// cancellation for all operations, need to be completely shut down. If all of the threads are not shut down, crashes in the DLL might
+ /// occur because code might be executed after the DLL is unloaded.
///
///
- // https://docs.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_shutdown WSMAN_PLUGIN_SHUTDOWN
- // WsmanPluginShutdown; DWORD WsmanPluginShutdown( PVOID pluginContext, DWORD flags, DWORD reason ) {...}
+ // https://docs.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_shutdown WSMAN_PLUGIN_SHUTDOWN WsmanPluginShutdown;
+ // DWORD WsmanPluginShutdown( PVOID pluginContext, DWORD flags, DWORD reason ) {...}
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[PInvokeData("wsman.h", MSDNShortId = "NC:wsman.WSMAN_PLUGIN_SHUTDOWN")]
public delegate uint WSMAN_PLUGIN_SHUTDOWN(IntPtr pluginContext, uint flags, WSMAN_SHUTDOWN reason);
@@ -439,9 +456,7 @@ public static partial class WsmSvc
/// WSMAN_SIGNAL_SHELL_CODE_TERMINATE
/// The shell or Command Prompt window was closed. The plug-in should call the WSManPluginOperationComplete function.
/// WSMAN_SIGNAL_SHELL_CODE_CTRL_C
- ///
- /// The signal for CTRL+C was received, and the process was halted. The plug-in should call the WSManPluginOperationComplete function.
- ///
+ /// The signal for CTRL+C was received, and the process was halted. The plug-in should call the WSManPluginOperationComplete function.
/// WSMAN_SIGNAL_SHELL_CODE_CTRL_BREAK
///
/// The signal for CTRL+BREAK was received, and the process was halted. The plug-in should call the WSManPluginOperationComplete function.
@@ -449,51 +464,50 @@ public static partial class WsmSvc
///
/// None
///
- /// A signal can be received for processing a CTRL+C sequence or one of many other types of custom signals. The callback is called
- /// once for each signal that is received. The plug-in determines which signals cause commands and/or shells to be shut down.
- /// Because signals are shell-specific, the plug-in must initiate the shutdown by calling the WSManPluginOperationComplete method.
- /// For each call, the plug-in should call WSManPluginOperationComplete to acknowledge receipt and to allow the next signal
- /// to be received.
+ /// A signal can be received for processing a CTRL+C sequence or one of many other types of custom signals. The callback is called once
+ /// for each signal that is received. The plug-in determines which signals cause commands and/or shells to be shut down. Because signals
+ /// are shell-specific, the plug-in must initiate the shutdown by calling the WSManPluginOperationComplete method. For each call, the
+ /// plug-in should call WSManPluginOperationComplete to acknowledge receipt and to allow the next signal to be received.
///
// https://docs.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_signal WSMAN_PLUGIN_SIGNAL WsmanPluginSignal; void
// WsmanPluginSignal( WSMAN_PLUGIN_REQUEST *requestDetails, DWORD flags, PVOID shellContext, PVOID commandContext, PCWSTR code ) {...}
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[PInvokeData("wsman.h", MSDNShortId = "NC:wsman.WSMAN_PLUGIN_SIGNAL")]
- public delegate void WSMAN_PLUGIN_SIGNAL(in WSMAN_PLUGIN_REQUEST requestDetails, uint flags, IntPtr shellContext,
- IntPtr commandContext, [MarshalAs(UnmanagedType.LPWStr)] string code);
+ public delegate void WSMAN_PLUGIN_SIGNAL(in WSMAN_PLUGIN_REQUEST requestDetails, [Optional] uint flags, IntPtr shellContext,
+ [Optional] IntPtr commandContext, [MarshalAs(UnmanagedType.LPWStr)] string code);
///
///
- /// Defines the startup callback for the plug-in. Because multiple applications can be hosted in the same process, this method can
- /// be called multiple times, but only once for each application initialization. A plug-in can be initialized more than once within
- /// the same process but only once for each applicationIdentification value. The context that is returned from this method should be
- /// application specific. The returned context will be passed into all future plug-in calls that are specific to the application.
- /// All Windows Remote Management (WinRM) plug-ins must implement this callback function.
+ /// Defines the startup callback for the plug-in. Because multiple applications can be hosted in the same process, this method can be
+ /// called multiple times, but only once for each application initialization. A plug-in can be initialized more than once within the same
+ /// process but only once for each applicationIdentification value. The context that is returned from this method should be application
+ /// specific. The returned context will be passed into all future plug-in calls that are specific to the application. All Windows Remote
+ /// Management (WinRM) plug-ins must implement this callback function.
///
/// The DLL entry point name for this method must be WSManPluginStartup.
///
/// Reserved for future use. Must be zero.
///
- /// A unique identifier for the hosted application. For the main WinRM service, the default is wsman. For an Internet
- /// Information Services (IIS) host, this identifier is related to the application endpoint for that host. For example, wsman/MyCompany/MyApplication.
+ /// A unique identifier for the hosted application. For the main WinRM service, the default is wsman. For an Internet Information
+ /// Services (IIS) host, this identifier is related to the application endpoint for that host. For example, wsman/MyCompany/MyApplication.
///
///
- /// A string that contains configuration information, if any information was stored when the plug-in was registered. When the
- /// plug-in is registered using the WinRM configuration, the plug-in can add extra configuration parameters that are useful during
- /// initialization to an optional node. This information can be especially useful if a plug-in is used in different IIS hosting
- /// scenarios and requires slightly different run-time semantics during initialization. This string is a copy of the XML from the
- /// configuration, if one is present. Otherwise, this parameter is set to NULL.
+ /// A string that contains configuration information, if any information was stored when the plug-in was registered. When the plug-in is
+ /// registered using the WinRM configuration, the plug-in can add extra configuration parameters that are useful during initialization to
+ /// an optional node. This information can be especially useful if a plug-in is used in different IIS hosting scenarios and requires
+ /// slightly different run-time semantics during initialization. This string is a copy of the XML from the configuration, if one is
+ /// present. Otherwise, this parameter is set to NULL.
///
///
///
/// The method returns NO_ERROR if it succeeded; otherwise, it returns an error code. If this method returns an error, the
/// WSManPluginShutdown entry point will not be called.
///
- // https://docs.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_startup WSMAN_PLUGIN_STARTUP WsmanPluginStartup;
- // DWORD WsmanPluginStartup( DWORD flags, PCWSTR applicationIdentification, PCWSTR extraInfo, PVOID *pluginContext ) {...}
+ // https://docs.microsoft.com/en-us/windows/win32/api/wsman/nc-wsman-wsman_plugin_startup WSMAN_PLUGIN_STARTUP WsmanPluginStartup; DWORD
+ // WsmanPluginStartup( DWORD flags, PCWSTR applicationIdentification, PCWSTR extraInfo, PVOID *pluginContext ) {...}
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[PInvokeData("wsman.h", MSDNShortId = "NC:wsman.WSMAN_PLUGIN_STARTUP")]
- public delegate uint WSMAN_PLUGIN_STARTUP(uint flags, [MarshalAs(UnmanagedType.LPWStr)] string applicationIdentification,
+ public delegate uint WSMAN_PLUGIN_STARTUP([Optional] uint flags, [MarshalAs(UnmanagedType.LPWStr)] string applicationIdentification,
[Optional, MarshalAs(UnmanagedType.LPWStr)] string? extraInfo, out IntPtr pluginContext);
/// The callback function that is called for shell operations, which result in a remote request.
@@ -506,13 +520,12 @@ public static partial class WsmSvc
/// Specifies the shell handle associated with the user context. The shell handle must be closed by calling the WSManCloseShell method.
///
///
- /// Specifies the command handle associated with the user context. The command handle must be closed by calling the
- /// WSManCloseCommand API method.
+ /// Specifies the command handle associated with the user context. The command handle must be closed by calling the WSManCloseCommand API method.
///
///
- /// Defines the operation handle associated with the user context. The operation handle is valid only for callbacks that are
- /// associated with WSManReceiveShellOutput, WSManSendShellInput, and WSManSignalShell calls. This handle must be closed by calling
- /// the WSManCloseOperation method.
+ /// Defines the operation handle associated with the user context. The operation handle is valid only for callbacks that are associated
+ /// with WSManReceiveShellOutput, WSManSendShellInput, and WSManSignalShell calls. This handle must be closed by calling the
+ /// WSManCloseOperation method.
///
///
/// None
@@ -1008,7 +1021,7 @@ public static partial class WsmSvc
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManConnectShell")]
public static extern void WSManConnectShell(WSMAN_SESSION_HANDLE session, uint flags, [MarshalAs(UnmanagedType.LPWStr)] string resourceUri,
[MarshalAs(UnmanagedType.LPWStr)] string shellID, in WSMAN_OPTION_SET options, in WSMAN_DATA connectXml, in WSMAN_SHELL_ASYNC async,
- out WSMAN_SHELL_HANDLE shell);
+ out SafeWSMAN_SHELL_HANDLE shell);
/// Connects to an existing server session.
/// Specifies the session handle returned by a WSManCreateSession function. This parameter cannot be NULL.
@@ -1051,7 +1064,7 @@ public static partial class WsmSvc
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManConnectShell")]
public static extern void WSManConnectShell(WSMAN_SESSION_HANDLE session, uint flags, [MarshalAs(UnmanagedType.LPWStr)] string resourceUri,
[MarshalAs(UnmanagedType.LPWStr)] string shellID, [In, Optional] IntPtr options, [In, Optional] IntPtr connectXml,
- in WSMAN_SHELL_ASYNC async, out WSMAN_SHELL_HANDLE shell);
+ in WSMAN_SHELL_ASYNC async, out SafeWSMAN_SHELL_HANDLE shell);
/// Connects to an existing command running in a shell.
/// Specifies the shell handle returned by the WSManCreateShell call. This parameter cannot be NULL.
@@ -1174,7 +1187,7 @@ public static partial class WsmSvc
// *proxyInfo, WSMAN_SESSION_HANDLE *session );
[DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManCreateSession")]
- public static extern uint WSManCreateSession(WSMAN_API_HANDLE apiHandle, [Optional, MarshalAs(UnmanagedType.LPWStr)] string? connection,
+ public static extern Win32Error WSManCreateSession(WSMAN_API_HANDLE apiHandle, [Optional, MarshalAs(UnmanagedType.LPWStr)] string? connection,
[Optional] uint flags, IntPtr serverAuthenticationCredentials, [In, Optional] IntPtr proxyInfo, out SafeWSMAN_SESSION_HANDLE session);
///
@@ -1184,7 +1197,6 @@ public static partial class WsmSvc
/// parameter and authenticated by using the credentials parameter.
///
/// Specifies the session handle returned by a WSManCreateSession call. This parameter cannot be NULL.
- /// Reserved for future use. Must be zero.
///
/// Defines the shell type to create. The shell type is defined by a unique URI. The actual shell object returned by the call is
/// dependent on the URI specified. This parameter cannot be NULL. To create a Windows cmd.exe shell, use the
@@ -1216,10 +1228,11 @@ public static partial class WsmSvc
// https://docs.microsoft.com/en-us/windows/win32/api/wsman/nf-wsman-wsmancreateshell void WSManCreateShell( WSMAN_SESSION_HANDLE
// session, DWORD flags, PCWSTR resourceUri, WSMAN_SHELL_STARTUP_INFO *startupInfo, WSMAN_OPTION_SET *options, WSMAN_DATA
// *createXml, WSMAN_SHELL_ASYNC *async, WSMAN_SHELL_HANDLE *shell );
- [DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManCreateShell")]
- public static extern void WSManCreateShell(WSMAN_SESSION_HANDLE session, [Optional] uint flags, [MarshalAs(UnmanagedType.LPWStr)] string resourceUri,
- [In, Optional] IntPtr startupInfo, in WSMAN_OPTION_SET options, in WSMAN_DATA createXml, in WSMAN_SHELL_ASYNC async, out WSMAN_SHELL_HANDLE shell);
+ public static void WSManCreateShell(WSMAN_SESSION_HANDLE session, string resourceUri, [In, Optional] WSMAN_SHELL_STARTUP_INFO? startupInfo,
+ [In, Optional] WSMAN_OPTION_SET? options, [In, Optional] WSMAN_DATA? createXml, in WSMAN_SHELL_ASYNC async, out WSMAN_SHELL_HANDLE shell) =>
+ WSManCreateShell(session, 0, resourceUri, (SafeCoTaskMemStruct)startupInfo,
+ (SafeCoTaskMemStruct)options, (SafeCoTaskMemStruct)createXml, async, out shell);
///
/// Creates a shell object. The returned shell handle identifies an object that defines the context in which commands can be run.
@@ -1260,8 +1273,8 @@ public static partial class WsmSvc
// https://docs.microsoft.com/en-us/windows/win32/api/wsman/nf-wsman-wsmancreateshell void WSManCreateShell( WSMAN_SESSION_HANDLE
// session, DWORD flags, PCWSTR resourceUri, WSMAN_SHELL_STARTUP_INFO *startupInfo, WSMAN_OPTION_SET *options, WSMAN_DATA
// *createXml, WSMAN_SHELL_ASYNC *async, WSMAN_SHELL_HANDLE *shell );
- [DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManCreateShell")]
+ [DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
public static extern void WSManCreateShell(WSMAN_SESSION_HANDLE session, [Optional] uint flags, [MarshalAs(UnmanagedType.LPWStr)] string resourceUri,
[In, Optional] IntPtr startupInfo, [In, Optional] IntPtr options, [In, Optional] IntPtr createXml, in WSMAN_SHELL_ASYNC async, out WSMAN_SHELL_HANDLE shell);
@@ -1303,11 +1316,12 @@ public static partial class WsmSvc
// https://docs.microsoft.com/en-us/windows/win32/api/wsman/nf-wsman-wsmancreateshellex void WSManCreateShellEx(
// WSMAN_SESSION_HANDLE session, DWORD flags, PCWSTR resourceUri, PCWSTR shellId, WSMAN_SHELL_STARTUP_INFO *startupInfo,
// WSMAN_OPTION_SET *options, WSMAN_DATA *createXml, WSMAN_SHELL_ASYNC *async, WSMAN_SHELL_HANDLE *shell );
- [DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManCreateShellEx")]
- public static extern void WSManCreateShellEx(WSMAN_SESSION_HANDLE session, uint flags, [MarshalAs(UnmanagedType.LPWStr)] string resourceUri,
- [MarshalAs(UnmanagedType.LPWStr)] string shellId, in WSMAN_SHELL_STARTUP_INFO_V11 startupInfo, in WSMAN_OPTION_SET options,
- in WSMAN_DATA createXml, in WSMAN_SHELL_ASYNC async, out WSMAN_SHELL_HANDLE shell);
+ public static void WSManCreateShellEx(WSMAN_SESSION_HANDLE session, uint flags, string resourceUri,
+ string shellId, [In, Optional] WSMAN_SHELL_STARTUP_INFO? startupInfo, [In, Optional] WSMAN_OPTION_SET? options,
+ [In, Optional] WSMAN_DATA? createXml, in WSMAN_SHELL_ASYNC async, out WSMAN_SHELL_HANDLE shell) =>
+ WSManCreateShellEx(session, flags, resourceUri, shellId, (IntPtr)(SafeCoTaskMemStruct)startupInfo,
+ (SafeCoTaskMemStruct)options, (SafeCoTaskMemStruct)createXml, async, out shell);
///
/// Creates a shell object by using the same functionality as the WSManCreateShell function, with the addition of a client-specified
@@ -1415,6 +1429,54 @@ public static partial class WsmSvc
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManDisconnectShell")]
public static extern void WSManDisconnectShell(WSMAN_SHELL_HANDLE shell, WSMAN_FLAG_SERVER_BUFFERING_MODE flags, ref WSMAN_SHELL_DISCONNECT_INFO disconnectInfo, ref WSMAN_SHELL_ASYNC async);
+ /// Disconnects the network connection of an active shell and its associated commands.
+ /// Specifies the handle returned by a call to the WSManCreateShell function. This parameter cannot be NULL.
+ ///
+ /// Can be a WSMAN_FLAG_SERVER_BUFFERING_MODE_DROP flag or a WSMAN_FLAG_SERVER_BUFFERING_MODE_BLOCK flag.
+ ///
+ ///
+ /// A pointer to a WSMAN_SHELL_DISCONNECT_INFO structure that specifies an idle time-out that the server session may enforce. If
+ /// this parameter is NULL, the server session idle time-out will not be changed.
+ ///
+ ///
+ /// Defines an asynchronous structure to contain an optional user context and a mandatory callback function. For more information,
+ /// see WSMAN_SHELL_ASYNC. This parameter cannot be NULL.
+ ///
+ /// None
+ ///
+ ///
+ /// This function suspends network connection to an actively connected server session. Any operations performed on the shell
+ /// instance, like WSManRunShellCommand, WSManSendShellInput, or WSManSignalShell, are bound to complete before disconnection. This
+ /// ensures that any data sent through WSManSendShellInput is received by the server session before the shell disconnects.
+ /// The client can optionally modify the server buffering mode by using flags. The following behavior is observed:
+ ///
+ ///
+ /// -
+ ///
+ /// WSMAN_FLAG_SERVER_BUFFERING_MODE_DROP–When buffers are full, the server drops earlier data in response stream buffers to
+ /// ensure the corresponding command operation continues to run.
+ ///
+ ///
+ /// -
+ ///
+ /// WSMAN_FLAG_SERVER_BUFFERING_MODE_BLOCK–When response stream buffers are full, the server blocks command execution. If no
+ /// flag is specified, the server continues to use either the configured mode or the mode specified when the shell was created. In
+ /// case of a network failure, if the client is unable to contact the session to disconnect the shell, the following error is returned:
+ /// ERROR_WINRS_SHELL_DISCONNECT_OPERATION_NOT_GRACEFUL
+ ///
+ /// The client session still goes into a disconnected state, but it is not guaranteed that any prior operations have completed
+ /// before the session is disconnected.
+ ///
+ ///
+ ///
+ ///
+ ///
+ // https://docs.microsoft.com/en-us/windows/win32/api/wsman/nf-wsman-wsmandisconnectshell void WSManDisconnectShell(
+ // WSMAN_SHELL_HANDLE shell, DWORD flags, WSMAN_SHELL_DISCONNECT_INFO *disconnectInfo, WSMAN_SHELL_ASYNC *async );
+ [DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
+ [PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManDisconnectShell")]
+ public static extern void WSManDisconnectShell(WSMAN_SHELL_HANDLE shell, WSMAN_FLAG_SERVER_BUFFERING_MODE flags, [In, Optional] IntPtr disconnectInfo, ref WSMAN_SHELL_ASYNC async);
+
/// Retrieves the error messages associated with a particular error and language codes.
/// Specifies the API handle returned by a WSManInitialize call. This parameter cannot be NULL.
/// Reserved for future use. Must be zero.
@@ -1448,9 +1510,9 @@ public static partial class WsmSvc
// *messageLengthUsed );
[DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManGetErrorMessage")]
- public static extern uint WSManGetErrorMessage(WSMAN_API_HANDLE apiHandle, [Optional] uint flags,
+ public static extern Win32Error WSManGetErrorMessage(WSMAN_API_HANDLE apiHandle, [Optional] uint flags,
[Optional, MarshalAs(UnmanagedType.LPWStr)] string? languageCode, uint errorCode, uint messageLength,
- [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder message, out uint messageLengthUsed);
+ [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder? message, out uint messageLengthUsed);
/// Gets the value of a session option.
/// Specifies the handle returned by a WSManCreateSession call. This parameter cannot be NULL.
@@ -1463,7 +1525,7 @@ public static partial class WsmSvc
// WSManGetSessionOptionAsDword( WSMAN_SESSION_HANDLE session, WSManSessionOption option, DWORD *value );
[DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManGetSessionOptionAsDword")]
- public static extern uint WSManGetSessionOptionAsDword(WSMAN_SESSION_HANDLE session, WSManSessionOption option, ref uint value);
+ public static extern Win32Error WSManGetSessionOptionAsDword(WSMAN_SESSION_HANDLE session, WSManSessionOption option, out uint value);
/// Gets the value of a session option.
/// Specifies the session handle returned by a WSManCreateSession call. This parameter cannot be NULL.
@@ -1480,8 +1542,8 @@ public static partial class WsmSvc
// *stringLengthUsed );
[DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManGetSessionOptionAsString")]
- public static extern uint WSManGetSessionOptionAsString(WSMAN_SESSION_HANDLE session, WSManSessionOption option, uint stringLength,
- [MarshalAs(UnmanagedType.LPWStr)] StringBuilder @string, out uint stringLengthUsed);
+ public static extern Win32Error WSManGetSessionOptionAsString(WSMAN_SESSION_HANDLE session, WSManSessionOption option, uint stringLength,
+ [MarshalAs(UnmanagedType.LPWStr)] StringBuilder? @string, out uint stringLengthUsed);
///
/// Initializes the Windows Remote Management Client API. WSManInitialize can be used by different clients on the same process.
@@ -1532,7 +1594,7 @@ public static partial class WsmSvc
// errorCode, PCWSTR extendedErrorInformation );
[DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManPluginAuthzOperationComplete")]
- public static extern uint WSManPluginAuthzOperationComplete(in WSMAN_SENDER_DETAILS senderDetails, [Optional] uint flags,
+ public static extern Win32Error WSManPluginAuthzOperationComplete(in WSMAN_SENDER_DETAILS senderDetails, [Optional] uint flags,
[In, Optional] IntPtr userAuthorizationContext, uint errorCode, [Optional, MarshalAs(UnmanagedType.LPWStr)] string? extendedErrorInformation);
///
@@ -1567,7 +1629,7 @@ public static partial class WsmSvc
// PCWSTR extendedErrorInformation );
[DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManPluginAuthzQueryQuotaComplete")]
- public static extern uint WSManPluginAuthzQueryQuotaComplete(in WSMAN_SENDER_DETAILS senderDetails, [Optional] uint flags,
+ public static extern Win32Error WSManPluginAuthzQueryQuotaComplete(in WSMAN_SENDER_DETAILS senderDetails, [Optional] uint flags,
in WSMAN_AUTHZ_QUOTA quota, uint errorCode, [Optional, MarshalAs(UnmanagedType.LPWStr)] string? extendedErrorInformation);
///
@@ -1602,7 +1664,7 @@ public static partial class WsmSvc
// PCWSTR extendedErrorInformation );
[DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManPluginAuthzQueryQuotaComplete")]
- public static extern uint WSManPluginAuthzQueryQuotaComplete(in WSMAN_SENDER_DETAILS senderDetails, [Optional] uint flags,
+ public static extern Win32Error WSManPluginAuthzQueryQuotaComplete(in WSMAN_SENDER_DETAILS senderDetails, [Optional] uint flags,
[In, Optional] IntPtr quota, uint errorCode, [Optional, MarshalAs(UnmanagedType.LPWStr)] string? extendedErrorInformation);
///
@@ -1659,7 +1721,7 @@ public static partial class WsmSvc
// impersonationToken, BOOL userIsAdministrator, DWORD errorCode, PCWSTR extendedErrorInformation );
[DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManPluginAuthzUserComplete")]
- public static extern uint WSManPluginAuthzUserComplete(in WSMAN_SENDER_DETAILS senderDetails, [Optional] uint flags,
+ public static extern Win32Error WSManPluginAuthzUserComplete(in WSMAN_SENDER_DETAILS senderDetails, [Optional] uint flags,
[In, Optional] IntPtr userAuthorizationContext, [In, Optional] HTOKEN impersonationToken,
[MarshalAs(UnmanagedType.Bool)] bool userIsAdministrator, uint errorCode,
[Optional, MarshalAs(UnmanagedType.LPWStr)] string? extendedErrorInformation);
@@ -1679,7 +1741,7 @@ public static partial class WsmSvc
// WSManPluginFreeRequestDetails( WSMAN_PLUGIN_REQUEST *requestDetails );
[DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManPluginFreeRequestDetails")]
- public static extern uint WSManPluginFreeRequestDetails(in WSMAN_PLUGIN_REQUEST requestDetails);
+ public static extern Win32Error WSManPluginFreeRequestDetails(in WSMAN_PLUGIN_REQUEST requestDetails);
///
/// Gets operational information for items such as time-outs and data restrictions that are associated with the operation. A plug-in
@@ -1735,7 +1797,7 @@ public static partial class WsmSvc
// WSManPluginGetOperationParameters( WSMAN_PLUGIN_REQUEST *requestDetails, DWORD flags, WSMAN_DATA *data );
[DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManPluginGetOperationParameters")]
- public static extern uint WSManPluginGetOperationParameters(in WSMAN_PLUGIN_REQUEST requestDetails, WSMAN_PLUGIN_PARAMS_OP flags,
+ public static extern Win32Error WSManPluginGetOperationParameters(in WSMAN_PLUGIN_REQUEST requestDetails, WSMAN_PLUGIN_PARAMS_OP flags,
out WSMAN_DATA data);
///
@@ -1767,7 +1829,7 @@ public static partial class WsmSvc
// WSManPluginOperationComplete( WSMAN_PLUGIN_REQUEST *requestDetails, DWORD flags, DWORD errorCode, PCWSTR extendedInformation );
[DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManPluginOperationComplete")]
- public static extern uint WSManPluginOperationComplete(in WSMAN_PLUGIN_REQUEST requestDetails, [Optional] uint flags,
+ public static extern Win32Error WSManPluginOperationComplete(in WSMAN_PLUGIN_REQUEST requestDetails, [Optional] uint flags,
uint errorCode, [Optional, MarshalAs(UnmanagedType.LPWStr)] string? extendedInformation);
///
@@ -1812,7 +1874,7 @@ public static partial class WsmSvc
// WSMAN_PLUGIN_REQUEST *requestDetails, DWORD flags, PCWSTR stream, WSMAN_DATA *streamResult, PCWSTR commandState, DWORD exitCode );
[DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManPluginReceiveResult")]
- public static extern uint WSManPluginReceiveResult(in WSMAN_PLUGIN_REQUEST requestDetails, [Optional] uint flags,
+ public static extern Win32Error WSManPluginReceiveResult(in WSMAN_PLUGIN_REQUEST requestDetails, [Optional] uint flags,
[Optional, MarshalAs(UnmanagedType.LPWStr)] string? stream, in WSMAN_DATA streamResult,
[Optional, MarshalAs(UnmanagedType.LPWStr)] string? commandState, uint exitCode);
@@ -1858,7 +1920,7 @@ public static partial class WsmSvc
// WSMAN_PLUGIN_REQUEST *requestDetails, DWORD flags, PCWSTR stream, WSMAN_DATA *streamResult, PCWSTR commandState, DWORD exitCode );
[DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManPluginReceiveResult")]
- public static extern uint WSManPluginReceiveResult(in WSMAN_PLUGIN_REQUEST requestDetails, [Optional] uint flags,
+ public static extern Win32Error WSManPluginReceiveResult(in WSMAN_PLUGIN_REQUEST requestDetails, [Optional] uint flags,
[Optional, MarshalAs(UnmanagedType.LPWStr)] string? stream, [In, Optional] IntPtr streamResult,
[Optional, MarshalAs(UnmanagedType.LPWStr)] string? commandState, uint exitCode);
@@ -1883,7 +1945,7 @@ public static partial class WsmSvc
// WSMAN_PLUGIN_REQUEST *requestDetails, DWORD flags, PVOID context );
[DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManPluginReportContext")]
- public static extern uint WSManPluginReportContext(in WSMAN_PLUGIN_REQUEST requestDetails, [Optional] uint flags, [In, Optional] IntPtr context);
+ public static extern Win32Error WSManPluginReportContext(in WSMAN_PLUGIN_REQUEST requestDetails, [Optional] uint flags, [In, Optional] IntPtr context);
/// Retrieves output from a running command or from the shell.
/// Specifies the shell handle returned by a WSManCreateShell call. This parameter cannot be NULL.
@@ -1996,7 +2058,7 @@ public static partial class WsmSvc
// WSMAN_SHELL_ASYNC *async, WSMAN_COMMAND_HANDLE *command );
[DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManRunShellCommand")]
- public static extern void WSManRunShellCommand(WSMAN_SHELL_HANDLE shell, [Optional] uint flags, [MarshalAs(UnmanagedType.LPWStr)] string commandLine,
+ public static extern void WSManRunShellCommand(WSMAN_SHELL_HANDLE shell, [Optional] uint flags, [MarshalAs(UnmanagedType.LPWStr)] string? commandLine,
in WSMAN_COMMAND_ARG_SET args, in WSMAN_OPTION_SET options, in WSMAN_SHELL_ASYNC async, out WSMAN_COMMAND_HANDLE command);
/// Starts the execution of a command within an existing shell and does not wait for the completion of the command.
@@ -2073,7 +2135,7 @@ public static partial class WsmSvc
[DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManRunShellCommandEx")]
public static extern void WSManRunShellCommandEx([In, Out] WSMAN_SHELL_HANDLE shell, [Optional] uint flags,
- [MarshalAs(UnmanagedType.LPWStr)] string commandId, [MarshalAs(UnmanagedType.LPWStr)] string commandLine,
+ [MarshalAs(UnmanagedType.LPWStr)] string commandId, [MarshalAs(UnmanagedType.LPWStr)] string? commandLine,
in WSMAN_COMMAND_ARG_SET args, in WSMAN_OPTION_SET options, in WSMAN_SHELL_ASYNC async, out WSMAN_COMMAND_HANDLE command);
///
@@ -2115,7 +2177,7 @@ public static partial class WsmSvc
[DllImport(Lib_WsmSvc, SetLastError = false, ExactSpelling = true)]
[PInvokeData("wsman.h", MSDNShortId = "NF:wsman.WSManRunShellCommandEx")]
public static extern void WSManRunShellCommandEx([In, Out] WSMAN_SHELL_HANDLE shell, [Optional] uint flags,
- [MarshalAs(UnmanagedType.LPWStr)] string commandId, [MarshalAs(UnmanagedType.LPWStr)] string commandLine,
+ [MarshalAs(UnmanagedType.LPWStr)] string commandId, [MarshalAs(UnmanagedType.LPWStr)] string? commandLine,
[In, Optional] IntPtr args, [In, Optional] IntPtr options, in WSMAN_SHELL_ASYNC async, out WSMAN_COMMAND_HANDLE command);
/// Pipes the input stream to a running command or to the shell.
@@ -2491,7 +2553,7 @@ public static partial class WsmSvc
/// Defines the environment variable value. NULL or empty string values are permitted.
[MarshalAs(UnmanagedType.LPWStr)]
- public string value;
+ public string? value;
}
/// Defines an array of environment variables.
@@ -2528,22 +2590,22 @@ public static partial class WsmSvc
/// present in the fault. If there is no fault detail, this field contains the fault reason text. This field can be set to NULL.
///
[MarshalAs(UnmanagedType.LPWStr)]
- public string errorDetail;
+ public string? errorDetail;
///
/// Specifies the language for the error description. This field can be set to NULL. For more information about the
/// language format, see the RFC 3066 specification from the Internet Engineering Task Force at http://www.ietf.org/rfc/rfc3066.txt.
///
[MarshalAs(UnmanagedType.LPWStr)]
- public string language;
+ public string? language;
/// Specifies the name of the computer. This field can be set to NULL.
[MarshalAs(UnmanagedType.LPWStr)]
- public string machineName;
+ public string? machineName;
/// Specifies the name of the plug-in that generated the error. This field can be set to NULL.
[MarshalAs(UnmanagedType.LPWStr)]
- public string pluginName;
+ public string? pluginName;
}
///
@@ -2558,11 +2620,11 @@ public static partial class WsmSvc
{
/// Reserved for future use. This parameter must be NULL.
[MarshalAs(UnmanagedType.LPWStr)]
- public string filter;
+ public string? filter;
/// Reserved for future use. This parameter must be NULL.
[MarshalAs(UnmanagedType.LPWStr)]
- public string dialect;
+ public string? dialect;
}
///
@@ -2577,11 +2639,11 @@ public static partial class WsmSvc
{
/// Reserved for future use. This parameter must be NULL.
[MarshalAs(UnmanagedType.LPWStr)]
- public string path;
+ public string? path;
/// Reserved for future use. This parameter must be NULL.
[MarshalAs(UnmanagedType.LPWStr)]
- public string dialect;
+ public string? dialect;
}
/// Represents a key and value pair within a selector set and is used to identify a particular resource.
@@ -3085,69 +3147,6 @@ public static partial class WsmSvc
public IntPtr DangerousGetHandle() => handle;
}
- ///
- ///
- /// Defines the shell startup parameters to be used with the WSManCreateShell function. The structure must be allocated by the
- /// client and passed to the WSManCreateShell function.
- ///
- ///
- /// The configuration passed to the WSManCreateShell function can directly affect the behavior of a command executed within the
- /// shell. A typical example is the workingDirectory argument that describes the working directory associated with each process,
- /// which the operating system uses when attempting to locate files specified by using a relative path.
- ///
- ///
- /// In the absence of specific requirements for stream naming, clients and services should attempt to use STDIN for input
- /// streams, STDOUT for the default output stream, and STDERR for the error or status output stream.
- ///
- ///
- // https://docs.microsoft.com/en-us/windows/win32/api/wsman/ns-wsman-wsman_shell_startup_info_v10 typedef struct
- // _WSMAN_SHELL_STARTUP_INFO_V10 { WSMAN_STREAM_ID_SET *inputStreamSet; WSMAN_STREAM_ID_SET *outputStreamSet; DWORD idleTimeoutMs;
- // PCWSTR workingDirectory; WSMAN_ENVIRONMENT_VARIABLE_SET *variableSet; } WSMAN_SHELL_STARTUP_INFO_V10;
- [PInvokeData("wsman.h", MSDNShortId = "NS:wsman._WSMAN_SHELL_STARTUP_INFO_V10")]
- [StructLayout(LayoutKind.Sequential)]
- public struct WSMAN_SHELL_STARTUP_INFO_V10
- {
- ///
- /// A pointer to a WSMAN_STREAM_ID_SET structure that specifies a set of input streams for the shell. Streams not present in the
- /// filter can be ignored by the shell implementation. For the Windows Cmd.exe shell, this value should be L"stdin". If the
- /// value is NULL, the implementation uses an array with L"stdin" as the default value.
- ///
- public IntPtr inputStreamSet;
-
- ///
- /// A pointer to a WSMAN_STREAM_ID_SET structure that specifies a set of output streams for the shell. Streams not present in
- /// the filter can be ignored by the shell implementation. For the Windows cmd.exe shell, this value should be L"stdout stderr".
- /// If the value is NULL, the implementation uses an array with L"stdout" and L"stderr" as the default value.
- ///
- public IntPtr outputStreamSet;
-
- ///
- /// Specifies the maximum duration, in milliseconds, the shell will stay open without any client request. When the maximum
- /// duration is exceeded, the shell is automatically deleted. Any value from 0 to 0xFFFFFFFF can be set. This duration has a
- /// maximum value specified by the Idle time-out GPO setting, if enabled, or by the IdleTimeout local configuration. The default
- /// value of the maximum duration in the GPO/local configuration is 15 minutes. However, a system administrator can change this
- /// value. To use the maximum value from the GPO/local configuration, the client should specify 0 (zero) in this field. If an
- /// explicit value between 0 to 0xFFFFFFFF is used, the minimum value between the explicit API value and the value from the
- /// GPO/local configuration is used.
- ///
- public uint idleTimeoutMs;
-
- ///
- /// Specifies the starting directory for a shell. It is used with any execution command. If this member is a NULL value,
- /// a default directory will be used by the remote machine when executing the command. An empty value is treated by the
- /// underlying protocol as an omitted value.
- ///
- [MarshalAs(UnmanagedType.LPWStr)]
- public string workingDirectory;
-
- ///
- /// A pointer to a WSMAN_ENVIRONMENT_VARIABLE_SET structure that specifies an array of variable name and value pairs, which
- /// describe the starting environment for the shell. The content of these elements is shell specific and can be defined in terms
- /// of other environment variables. If a NULL value is passed, the default environment is used on the server side.
- ///
- public IntPtr variableSet;
- }
-
///
///
/// Defines the shell startup parameters to be used with the WSManCreateShell function. The structure must be allocated by the
@@ -3167,7 +3166,7 @@ public static partial class WsmSvc
// _WSMAN_SHELL_STARTUP_INFO_V11 : _WSMAN_SHELL_STARTUP_INFO_V10 { PCWSTR name; } WSMAN_SHELL_STARTUP_INFO_V11;
[PInvokeData("wsman.h", MSDNShortId = "NS:wsman._WSMAN_SHELL_STARTUP_INFO_V11")]
[StructLayout(LayoutKind.Sequential)]
- public struct WSMAN_SHELL_STARTUP_INFO_V11
+ public struct WSMAN_SHELL_STARTUP_INFO
{
///
/// A pointer to a WSMAN_STREAM_ID_SET structure that specifies a set of input streams for the shell. Streams not present in the
@@ -3200,7 +3199,7 @@ public static partial class WsmSvc
/// underlying protocol as an omitted value.
///
[MarshalAs(UnmanagedType.LPWStr)]
- public string workingDirectory;
+ public string? workingDirectory;
///
/// A pointer to a WSMAN_ENVIRONMENT_VARIABLE_SET structure that specifies an array of variable name and value pairs, which
@@ -3214,7 +3213,7 @@ public static partial class WsmSvc
/// passes the flag WSMAN_FLAG_REQUESTED_API_VERSION_1_1 to WSManInitialize.
///
[MarshalAs(UnmanagedType.LPWStr)]
- public string name;
+ public string? name;
}
/// Lists all the streams that are used for either input or output for the shell and commands.
@@ -3251,11 +3250,11 @@ public static partial class WsmSvc
{
/// Defines the user name for a local or domain account. It cannot be NULL.
[MarshalAs(UnmanagedType.LPWStr)]
- public string username;
+ public string? username;
/// Defines the password for a local or domain account. It cannot be NULL.
[MarshalAs(UnmanagedType.LPWStr)]
- public string password;
+ public string? password;
}
/// Provides a for that is disposed using .
@@ -3326,4 +3325,35 @@ public static partial class WsmSvc
///
protected override bool InternalReleaseHandle() => WSManCloseSession(handle).Succeeded;
}
+
+ /// Provides a for that is disposed using .
+ public class SafeWSMAN_SHELL_HANDLE : SafeHANDLE
+ {
+ private WSMAN_SHELL_ASYNC async;
+
+ /// Initializes a new instance of the class and assigns an existing handle.
+ /// An object that represents the pre-existing handle to use.
+ /// The asynchronous information used in the WSManCreateShell method.
+ ///
+ /// to reliably release the handle during the finalization phase; otherwise, (not recommended).
+ ///
+ public SafeWSMAN_SHELL_HANDLE(IntPtr preexistingHandle, in WSMAN_SHELL_ASYNC async, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) => this.async = async;
+
+ /// Initializes a new instance of the class.
+ private SafeWSMAN_SHELL_HANDLE() : base() { }
+
+ /// Performs an implicit conversion from to .
+ /// The safe handle instance.
+ /// The result of the conversion.
+ public static implicit operator WSMAN_SHELL_HANDLE(SafeWSMAN_SHELL_HANDLE h) => h.handle;
+
+ ///
+ protected override bool InternalReleaseHandle()
+ {
+ if (async.completionFunction is null)
+ return false;
+ WSManCloseShell(handle, 0, async);
+ return true;
+ }
+ }
}
\ No newline at end of file
diff --git a/PInvoke/WsmSvc/WSManDisp.cs b/PInvoke/WsmSvc/WSManDisp.cs
index f48e04cb..ffbaddcf 100644
--- a/PInvoke/WsmSvc/WSManDisp.cs
+++ b/PInvoke/WsmSvc/WSManDisp.cs
@@ -303,7 +303,7 @@ public static partial class WsmSvc
// connection, long flags, IDispatch *connectionOptions, IDispatch **session );
[PreserveSig, DispId(1)]
HRESULT CreateSession([MarshalAs(UnmanagedType.BStr)] string connection, [Optional] WSManSessionFlags flags,
- IWSManConnectionOptions connectionOptions, out IWSManSession session);
+ IWSManConnectionOptions? connectionOptions, out IWSManSession session);
/// Creates an IWSManConnectionOptions object that specifies the user name and password used when creating a session.
/// A pointer to a new IWSManConnectionOptions object.
@@ -809,7 +809,7 @@ public static partial class WsmSvc
// connection, long flags, IDispatch *connectionOptions, IDispatch **session );
[PreserveSig, DispId(1)]
new HRESULT CreateSession([MarshalAs(UnmanagedType.BStr)] string connection, [Optional] WSManSessionFlags flags,
- IWSManConnectionOptions connectionOptions, out IWSManSession session);
+ IWSManConnectionOptions? connectionOptions, out IWSManSession session);
/// Creates an IWSManConnectionOptions object that specifies the user name and password used when creating a session.
/// A pointer to a new IWSManConnectionOptions object.
@@ -1247,7 +1247,7 @@ public static partial class WsmSvc
// connection, long flags, IDispatch *connectionOptions, IDispatch **session );
[PreserveSig, DispId(1)]
new HRESULT CreateSession([MarshalAs(UnmanagedType.BStr)] string connection, [Optional] WSManSessionFlags flags,
- IWSManConnectionOptions connectionOptions, out IWSManSession session);
+ IWSManConnectionOptions? connectionOptions, out IWSManSession session);
/// Creates an IWSManConnectionOptions object that specifies the user name and password used when creating a session.
/// A pointer to a new IWSManConnectionOptions object.
@@ -1700,7 +1700,7 @@ public static partial class WsmSvc
// connection, long flags, IDispatch *connectionOptions, IDispatch **session );
[PreserveSig, DispId(1)]
new HRESULT CreateSession([MarshalAs(UnmanagedType.BStr)] string connection, [Optional] WSManSessionFlags flags,
- IWSManConnectionOptions connectionOptions, out IWSManSession session);
+ IWSManConnectionOptions? connectionOptions, out IWSManSession session);
/// Creates an IWSManConnectionOptions object that specifies the user name and password used when creating a session.
/// A pointer to a new IWSManConnectionOptions object.
@@ -2572,7 +2572,7 @@ public static partial class WsmSvc
// resourceUri, BSTR filter, BSTR dialect, long flags, IDispatch **resultSet );
[PreserveSig, DispId(6)]
HRESULT Enumerate([In, MarshalAs(UnmanagedType.Struct)] object resourceUri, [MarshalAs(UnmanagedType.BStr)] string filter,
- [MarshalAs(UnmanagedType.BStr)] string dialect, WSManEnumFlags flags, out IWSManEnumerator resultSet);
+ [MarshalAs(UnmanagedType.BStr)] string? dialect, WSManEnumFlags flags, out IWSManEnumerator resultSet);
///
/// The IWSManSession::Identify method queries a remote computer to determine if it supports the WS-Management protocol.
diff --git a/PInvoke/WsmSvc/wsmerror.cs b/PInvoke/WsmSvc/wsmerror.cs
new file mode 100644
index 00000000..b15d863c
--- /dev/null
+++ b/PInvoke/WsmSvc/wsmerror.cs
@@ -0,0 +1,2712 @@
+namespace Vanara.PInvoke;
+
+public static partial class WsmSvc
+{
+ static WsmSvc() => StaticFieldValueHash.AddFields(Lib_WsmSvc);
+
+ /// WSMAN specific error codes
+ public enum WsmError : uint
+ {
+ ///
+ /// The WS-Management service cannot process the request. The service cannot find the resource identified by the resource URI and selectors.
+ ///
+ ERROR_WSMAN_RESOURCE_NOT_FOUND = 0x80338000,
+
+ ///
+ /// The WS-Management service cannot process the request. The WS-Addressing action URI is invalid. Check the documentation for
+ /// information on how to construct an action URI.
+ ///
+ ERROR_WSMAN_INVALID_ACTIONURI = 0x80338001,
+
+ ///
+ /// Same text as ERROR_WSMAN_INVALID_RESOURCE_URI, but some code in R2 uses this error code The WS-Management service cannot process
+ /// the request. The resource URI is missing or it has an incorrect format. Check the documentation or use the following command for
+ /// information on how to construct a resource URI: "winrm help uris".
+ ///
+ ERROR_WSMAN_INVALID_URI = 0x80338002,
+
+ /// An error was encountered inside the plugin.
+ ERROR_WSMAN_PROVIDER_FAILURE = 0x80338003,
+
+ ///
+ /// The WS-Management service cannot complete the request. The WSManEnumerator object is full and no more items can be added.
+ ///
+ ERROR_WSMAN_BATCH_COMPLETE = 0x80338004,
+
+ ///
+ /// The WS-Management configuration is corrupted. Use the following command to restore defaults: %n%n winrm invoke Restore
+ /// http://schemas.microsoft.com/wbem/wsman/1/config @{} %n%n Then add any custom configuration settings.
+ ///
+ ERROR_WSMAN_CONFIG_CORRUPTED = 0x80338005,
+
+ /// The WS-Management service cannot process a pull request because a pull operation is already in progress.
+ ERROR_WSMAN_PULL_IN_PROGRESS = 0x80338006,
+
+ /// The WS-Management enumeration session is finished or cancelled and cannot be used. Start a new enumeration.
+ ERROR_WSMAN_ENUMERATION_CLOSED = 0x80338007,
+
+ /// The event subscription is already closed and cannot be used. Start a new subscription.
+ ERROR_WSMAN_SUBSCRIPTION_CLOSED = 0x80338008,
+
+ /// The event subscription session is closing and cannot be used. Start a new subscription.
+ ERROR_WSMAN_SUBSCRIPTION_CLOSE_IN_PROGRESS = 0x80338009,
+
+ ///
+ /// The application or script that has an event subscription did not request a pull operation within the heartbeat interval. The
+ /// subscription session was closed. Start a new subscription.
+ ///
+ ERROR_WSMAN_SUBSCRIPTION_CLIENT_DID_NOT_CALL_WITHIN_HEARTBEAT = 0x8033800A,
+
+ ///
+ /// The event source did not return events within the heartbeat interval. The subscription session was closed. Start a new subscription.
+ ///
+ ERROR_WSMAN_SUBSCRIPTION_NO_HEARTBEAT = 0x8033800B,
+
+ ///
+ /// The WS-Management service does not support the specified timeout. The value specified is smaller than the minimum allowed value
+ /// for this setting. Change the timeout value and try the request again.
+ ///
+ ERROR_WSMAN_UNSUPPORTED_TIMEOUT = 0x8033800C,
+
+ ///
+ /// wsa, code=VersionMismatch, subcode=, details=version mismatch The WS-Management service does not support the SOAP version
+ /// specified in the request.
+ ///
+ ERROR_WSMAN_SOAP_VERSION_MISMATCH = 0x8033800D,
+
+ ///
+ /// wsa, code=DataEncodingUnknown, subcode=, details=version mismatch The WS-Management service does not support the encoding
+ /// specified in the request.
+ ///
+ ERROR_WSMAN_SOAP_DATA_ENCODING_UNKNOWN = 0x8033800E,
+
+ ///
+ /// wsa, code=Sender, subcode=WS-Addressing InvalidMessageInformationHeader, details=invalid_header The WS-Management service cannot
+ /// process the request. The request contains one or more invalid SOAP headers.
+ ///
+ ERROR_WSMAN_INVALID_MESSAGE_INFORMATION_HEADER = 0x8033800F,
+
+ ///
+ /// The WS-Management service cannot process a SOAP header in the request that is marked as mustUnderstand by the client. This could
+ /// be caused by the use of a version of the protocol which is not supported, or may be an incompatibility between the client and
+ /// server implementations.
+ ///
+ ERROR_WSMAN_SOAP_FAULT_MUST_UNDERSTAND = 0x80338010,
+
+ ///
+ /// wsa, code=Sender, subcode=WS-Addressing MessageInformationHeaderRequired, details=missing_header The WS-Management service cannot
+ /// process the request. The request does not have all the expected SOAP headers.
+ ///
+ ERROR_WSMAN_MESSAGE_INFORMATION_HEADER_REQUIRED = 0x80338011,
+
+ ///
+ /// wsa, code=Sender, subcode=WS-Addressing DestinationUnreachable, details= The client cannot connect to the destination specified
+ /// in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and
+ /// documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the
+ /// WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig".
+ ///
+ ERROR_WSMAN_DESTINATION_UNREACHABLE = 0x80338012,
+
+ ///
+ /// wsa, code=Sender, subcode=WS-Addressing ActionNotsupported, details=action The WS-Management service does not support the action
+ /// specified in the request.
+ ///
+ ERROR_WSMAN_ACTION_NOT_SUPPORTED = 0x80338013,
+
+ ///
+ /// This is probably what will wrap all other Windows error codes and so should not explicitly be used wsa, code=Receiver,
+ /// subcode=WS-Addressing EndpointUnavailable, details= The WS-Management service cannot process the request because the resource is
+ /// offline. Retry the request later when the resource is online.
+ ///
+ ERROR_WSMAN_ENDPOINT_UNAVAILABLE = 0x80338014,
+
+ ///
+ /// wsa, code=Sender, subcode=wxf:InvalidRepresentation, details= The WS-Management service cannot identify the format of the object
+ /// passed to a Put or Create method. The input XML may not be appropriate for the resource or uses the wrong schema for the
+ /// resource. Change the input XML in the request.
+ ///
+ ERROR_WSMAN_INVALID_REPRESENTATION = 0x80338015,
+
+ ///
+ /// wsen, code=Sender, subcode=WS-Enumeration InvalidExpirationTime, details= The expiration time passed to the WS-Management
+ /// Enumerate method is not valid. The time value may be zero or refer to a time in the past. Change the expiration time and try the
+ /// request again.
+ ///
+ ERROR_WSMAN_ENUMERATE_INVALID_EXPIRATION_TIME = 0x80338016,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management UnsupportedFeature - WS-Management faultDetail/ExpirationTime, details= The data source
+ /// does not support expiration time. Remove the expiration time from the request and try the request again.
+ ///
+ ERROR_WSMAN_ENUMERATE_UNSUPPORTED_EXPIRATION_TIME = 0x80338017,
+
+ ///
+ /// wsen, code=Sender, subcode=WS-Enumeration FilteringNotSupported, details= The data source does not support filtering. Remove the
+ /// filter from the request and try the request again.
+ ///
+ ERROR_WSMAN_ENUMERATE_FILTERING_NOT_SUPPORTED = 0x80338018,
+
+ ///
+ /// wsen, code=Sender, subcode=WS-Enumeration FilterDialectRequestedUnavailable, details=supported_dialects The filter dialect (the
+ /// type associated with the filter) was not supported for this resource. Change the filter dialect or remove it from the request and
+ /// try the request again.
+ ///
+ ERROR_WSMAN_ENUMERATE_FILTER_DIALECT_REQUESTED_UNAVAILABLE = 0x80338019,
+
+ ///
+ /// wsen, code=Sender, subcode=WS-Enumeration CannotProcessFilter, details= The data source could not process the filter. The filter
+ /// might be missing or it might be invalid. Change the filter and try the request again.
+ ///
+ ERROR_WSMAN_ENUMERATE_CANNOT_PROCESS_FILTER = 0x8033801A,
+
+ ///
+ /// wsen, code=Receiver, subcode=WS-Enumeration InvalidEnumerationContext, details= The WS-Enumeration context in the enumeration is
+ /// not valid. Enumeration may have been completed or canceled. You cannot use this enumeration context anymore. Start a new enumeration.
+ ///
+ ERROR_WSMAN_ENUMERATE_INVALID_ENUMERATION_CONTEXT = 0x8033801B,
+
+ ///
+ /// wsen, code=Receiver, subcode=WS-Enumeration TimedOut, details= The pull operation did not get any data in the MaxTime duration.
+ /// But the enumeration is still valid. The client can attempt to do another pull request to retrieve data.
+ ///
+ ERROR_WSMAN_ENUMERATE_TIMED_OUT = 0x8033801C,
+
+ ///
+ /// wsen, code=Receiver, subcode=WS-Enumeration UnableToRenew, details= The WS-Management service cannot renew the enumeration. Start
+ /// a new enumeration.
+ ///
+ ERROR_WSMAN_ENUMERATE_UNABLE_TO_RENEW = 0x8033801D,
+
+ ///
+ /// wse, code=Sender, subcode=WS-Eventing DeliveryModeRequestedUnavailable, details=List of delivery modes that are supported The
+ /// WS-Management service does not support the delivery mode for the specified resource. The client should change the subscription to
+ /// use one of the supported delivery modes.
+ ///
+ ERROR_WSMAN_EVENTING_DELIVERY_MODE_REQUESTED_UNAVAILABLE = 0x8033801E,
+
+ ///
+ /// wse, code=Sender, subcode=WS-Eventing InvalidExpirationTime, details= The expiration time of the subscription is invalid. The
+ /// time is either not supported, zero or a time that happened in the past. Change the expiration time and try the request again.
+ ///
+ ERROR_WSMAN_EVENTING_INVALID_EXPIRATION_TIME = 0x8033801F,
+
+ ///
+ /// wse, code=Sender, subcode=WS-Eventing UnsupportedExpirationType, details= The expiration time specified for subscription was
+ /// invalid. Specify the expiration time as a duration.
+ ///
+ ERROR_WSMAN_EVENTING_UNSUPPORTED_EXPIRATION_TYPE = 0x80338020,
+
+ ///
+ /// wse, code=Sender, subcode=WS-Eventing FilteringNotSupported, details= The event source does not support filtering. Remove the
+ /// filter from the request and try the request again.
+ ///
+ ERROR_WSMAN_EVENTING_FILTERING_NOT_SUPPORTED = 0x80338021,
+
+ ///
+ /// wse, code=Sender, subcode=WS-Eventing FilteringRequestedUnavailable, details= The event source cannot process the specified
+ /// filter. Change the filter or remove it from the request and try the request again.
+ ///
+ ERROR_WSMAN_EVENTING_FILTERING_REQUESTED_UNAVAILABLE = 0x80338022,
+
+ ///
+ /// wse, code=Receiver, subcode=WS-Eventing EventSourceUnableToProcess, details= The event source cannot process the subscription.
+ ///
+ ERROR_WSMAN_EVENTING_SOURCE_UNABLE_TO_PROCESS = 0x80338023,
+
+ ///
+ /// wse, code=Receiver, subcode=WS-Eventing UnableToRenew, details= The WS-Management service cannot renew the event subscription.
+ /// Create a new subscription.
+ ///
+ ERROR_WSMAN_EVENTING_UNABLE_TO_RENEW = 0x80338024,
+
+ ///
+ /// wse, code=Sender, subcode=WS-Eventing InvalidMessage, details= The WS-Management service cannot complete the WS-Eventing request
+ /// because the request had some unknown or invalid content and could not be processed.
+ ///
+ ERROR_WSMAN_EVENTING_INVALID_MESSAGE = 0x80338025,
+
+ /// The WS-Management service cannot process the response because it is larger than the maximum size allowed.
+ ERROR_WSMAN_ENVELOPE_TOO_LARGE = 0x80338026,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management InvalidBody, details= The WS-Management service cannot process the request because the
+ /// request packet does not have a valid SOAP body.
+ ///
+ ERROR_WSMAN_INVALID_SOAP_BODY = 0x80338027,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management InvalidResumptionContext, details= The resumption context specified in the subscription
+ /// is invalid. It may have expired, or be in the wrong format.
+ ///
+ ERROR_WSMAN_INVALID_RESUMPTION_CONTEXT = 0x80338028,
+
+ ///
+ /// wsman, code=Receiver, subcode=WS-Management Timedout, details= The WS-Management service cannot complete the operation within the
+ /// time specified in OperationTimeout.
+ ///
+ ERROR_WSMAN_OPERATION_TIMEDOUT = 0x80338029,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management ResumptionNotSupported, details= The event source does not support subscriptions that
+ /// can be resumed.
+ ///
+ ERROR_WSMAN_RESUMPTION_NOT_SUPPORTED = 0x8033802A,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management ResumptionTypeNotSupported, details= The WS-Management service does not support the
+ /// type of resumption requested by the subscription.
+ ///
+ ERROR_WSMAN_RESUMPTION_TYPE_NOT_SUPPORTED = 0x8033802B,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management UnsupportedEncoding, details= The request contains character encoding that is
+ /// unsupported. WS-Management only supports requests that are encoded in UTF-8 or UTF-16. Change the character encoding in the
+ /// request and try the request again.
+ ///
+ ERROR_WSMAN_UNSUPPORTED_ENCODING = 0x8033802C,
+
+ /// wsman, code=Sender, subcode=WS-Management UriLimit, details= The URI is longer than the maximum length allowed.
+ ERROR_WSMAN_URI_LIMIT = 0x8033802D,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management InvalidProposedID, details= The WS-Management service cannot process the request
+ /// because the subscription ID is invalid.
+ ///
+ ERROR_WSMAN_INVALID_PROPOSED_ID = 0x8033802E,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management InvalidBatchParameter, details= The WS-Management service cannot process the batch
+ /// request. The request must specify either MaxItems, MaxCharacters, or MaxTime.
+ ///
+ ERROR_WSMAN_INVALID_BATCH_PARAMETER = 0x8033802F,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management NoAck, details= The receiver of the event did not acknowledge the event delivery.
+ /// Submit the subscription again without the acknowledgement option.
+ ///
+ ERROR_WSMAN_NO_ACK = 0x80338030,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management ActionMismatch, details= The WS-Management service cannot process the request because
+ /// the WS-Addressing Action URI in the request is not compatible with the resource.
+ ///
+ ERROR_WSMAN_ACTION_MISMATCH = 0x80338031,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management Concurrency, details= The WS-Management service cannot complete the WS-Addressing
+ /// Action URI in the request because the resource was already in use.
+ ///
+ ERROR_WSMAN_CONCURRENCY = 0x80338032,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management AlreadyExists, details= The WS-Management service cannot create the resource because it
+ /// already exists.
+ ///
+ ERROR_WSMAN_ALREADY_EXISTS = 0x80338033,
+
+ ///
+ /// wsman, code=Receiver, subcode=WS-Management DeliveryRefused, details= The WS-Management service cannot complete the request
+ /// because the receiver does not accept the delivery of events. The receiver requests that the subscription be cancelled. Event
+ /// receivers return this message to force the cancellation of a subscription.
+ ///
+ ERROR_WSMAN_DELIVERY_REFUSED = 0x80338034,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management EncodingLimit, details= The WS-Management service cannot process the request because
+ /// the encoding of the request exceeds an internal encoding limit. Reconfigure the client to send messages which fit the encoding
+ /// limits of the service.
+ ///
+ ERROR_WSMAN_ENCODING_LIMIT = 0x80338035,
+
+ ///
+ /// wsman, code=Sender, subcode=wsse:FailedAuthentication, details= The WS-Management service cannot authenticate the sender.
+ ///
+ ERROR_WSMAN_FAILED_AUTHENTICATION = 0x80338036,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management IncompatibleEPR, details= The WS-Management service does not support the format of the
+ /// WS-Addressing Endpoint Reference.
+ ///
+ ERROR_WSMAN_INCOMPATIBLE_EPR = 0x80338037,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management InvalidBookmark, details= The bookmark in the subscription is invalid. The bookmark may
+ /// be expired or corrupted. Issue a new subscription without any bookmarks or locate the correct bookmark.
+ ///
+ ERROR_WSMAN_INVALID_BOOKMARK = 0x80338038,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management InvalidOptions, details= The WS-Management service cannot process the request because
+ /// one or more options are not valid. The option names or values may not be valid or they are used in incorrect combinations.
+ /// Retrieve the catalog entry for the resource and determine how to correct the invalid option values.
+ ///
+ ERROR_WSMAN_INVALID_OPTIONS = 0x80338039,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management InvalidParameter, details= The WS-Management service cannot process the request because
+ /// a parameter for the operation is not valid.
+ ///
+ ERROR_WSMAN_INVALID_PARAMETER = 0x8033803A,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management InvalidResourceURI, details= The WS-Management service cannot process the request. The
+ /// resource URI is missing or it has an incorrect format. Check the documentation or use the following command for information on
+ /// how to construct a resource URI: "winrm help uris".
+ ///
+ ERROR_WSMAN_INVALID_RESOURCE_URI = 0x8033803B,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management InvalidSystem, details= The WS-Management service requires a valid System URI to
+ /// process the request.
+ ///
+ ERROR_WSMAN_INVALID_SYSTEM = 0x8033803C,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management InvalidSelectors, details= The WS-Management service cannot process the request because
+ /// the selectors for the resource are not valid.
+ ///
+ ERROR_WSMAN_INVALID_SELECTORS = 0x8033803D,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management MetadaRedirect, details= The requested metadata is not available at the current
+ /// address. Retry the request with a new address.
+ ///
+ ERROR_WSMAN_METADATA_REDIRECT = 0x8033803E,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management QuotaLimit, details= The WS-Management service is busy servicing other requests. Retry later.
+ ///
+ ERROR_WSMAN_QUOTA_LIMIT = 0x8033803F,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management RenameFailure, details= The WS-Management service cannot rename the resource. The
+ /// selectors for the resource are not correct. The resource may exist already, the address may be incorrect, or the resource URI may
+ /// be invalid. Change the request and retry.
+ ///
+ ERROR_WSMAN_RENAME_FAILURE = 0x80338040,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management SchemaValidationError, details= The SOAP XML in the message does not match the
+ /// corresponding XML schema definition. Change the XML and retry.
+ ///
+ ERROR_WSMAN_SCHEMA_VALIDATION_ERROR = 0x80338041,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management UnsupportedFeature, details= The WS-Management service does not support the specified
+ /// feature. Remove the unsupported feature from the request and retry.
+ ///
+ ERROR_WSMAN_UNSUPPORTED_FEATURE = 0x80338042,
+
+ /// The WS-Management service cannot process the request because the XML is invalid.
+ ERROR_WSMAN_INVALID_XML = 0x80338043,
+
+ /// The WS-Management service cannot process the request because the URI contains an unexpected selector.
+ ERROR_WSMAN_INVALID_KEY = 0x80338044,
+
+ /// The event source is attempting to deliver an event when a delivery is in progress already.
+ ERROR_WSMAN_DELIVER_IN_PROGRESS = 0x80338045,
+
+ /// The WS-Management service cannot locate the system.
+ ERROR_WSMAN_SYSTEM_NOT_FOUND = 0x80338046,
+
+ /// The maximum envelope size in the request is too large. Change the maximum envelope size and try the request again.
+ ERROR_WSMAN_MAX_ENVELOPE_SIZE = 0x80338047,
+
+ /// The response that the WS-Management service computed exceeds the maximum envelope size in the request.
+ ERROR_WSMAN_MAX_ENVELOPE_SIZE_EXCEEDED = 0x80338048,
+
+ /// The response that the WS-Management service computed exceed the internal limit for envelope size.
+ ERROR_WSMAN_SERVER_ENVELOPE_LIMIT = 0x80338049,
+
+ /// The WS-Management service cannot process the request because the URI contains too many selectors.
+ ERROR_WSMAN_SELECTOR_LIMIT = 0x8033804A,
+
+ /// The WS-Management service cannot process the request because it contains too many options.
+ ERROR_WSMAN_OPTION_LIMIT = 0x8033804B,
+
+ ///
+ /// The WS-Management service does not support the character set used in the request. Change the request to use UTF-8 or UTF-16.
+ ///
+ ERROR_WSMAN_CHARACTER_SET = 0x8033804C,
+
+ /// The operation succeeded and cannot be reversed but the result is too large to send.
+ ERROR_WSMAN_UNREPORTABLE_SUCCESS = 0x8033804D,
+
+ /// The WS-Management service does not support white space in the request XML.
+ ERROR_WSMAN_WHITESPACE = 0x8033804E,
+
+ ///
+ /// The WS-Management service does not support the filter dialect in the request. The filter dialect is the type of filter, such as
+ /// XPath or WQL.
+ ///
+ ERROR_WSMAN_FILTERING_REQUIRED = 0x8033804F,
+
+ /// The WS-Management service cannot process the request because it contains a bookmark that is expired.
+ ERROR_WSMAN_BOOKMARK_EXPIRED = 0x80338050,
+
+ ///
+ /// The WS-Management provider does not support the specified option set because mustComply for one of the options is set to true.
+ /// Change mustComply for one of the options to false.
+ ///
+ ERROR_WSMAN_OPTIONS_NOT_SUPPORTED = 0x80338051,
+
+ /// The WS-Management service cannot process the request because one or more of the options has an invalid name.
+ ERROR_WSMAN_OPTIONS_INVALID_NAME = 0x80338052,
+
+ /// The WS-Management service cannot process the request because one or more of the options has an invalid value.
+ ERROR_WSMAN_OPTIONS_INVALID_VALUE = 0x80338053,
+
+ ///
+ /// The WS-Management service cannot process the request. A parameter that is required for the operation is not the correct type.
+ ///
+ ERROR_WSMAN_PARAMETER_TYPE_MISMATCH = 0x80338054,
+
+ /// The WS-Management service cannot process the request. A parameter name is invalid.
+ ERROR_WSMAN_INVALID_PARAMETER_NAME = 0x80338055,
+
+ /// The WS-Management service cannot process the request because the XML content has invalid values.
+ ERROR_WSMAN_INVALID_XML_VALUES = 0x80338056,
+
+ /// The WS-Management service cannot process the request because the XML content has missing values.
+ ERROR_WSMAN_INVALID_XML_MISSING_VALUES = 0x80338057,
+
+ ///
+ /// The WS-Management service cannot identify the format of the object passed to a Put or Create method. The XML namespace for the
+ /// input XML is invalid. Change the XML namespace for the input XML in the request.
+ ///
+ ERROR_WSMAN_INVALID_XML_NAMESPACE = 0x80338058,
+
+ /// The WS-Management service cannot process the request because an XML fragment in the URI is invalid.
+ ERROR_WSMAN_INVALID_XML_FRAGMENT = 0x80338059,
+
+ /// The WS-Management service cannot process the request because the request did not contain all required selectors.
+ ERROR_WSMAN_INSUFFCIENT_SELECTORS = 0x8033805A,
+
+ /// The WS-Management service cannot process the request because the request contained invalid selectors for the resource.
+ ERROR_WSMAN_UNEXPECTED_SELECTORS = 0x8033805B,
+
+ /// The WS-Management service cannot process the request because a value for a selector is of the wrong type.
+ ERROR_WSMAN_SELECTOR_TYPEMISMATCH = 0x8033805C,
+
+ /// The WS-Management service cannot process the request because a value for the selector is invalid.
+ ERROR_WSMAN_INVALID_SELECTOR_VALUE = 0x8033805D,
+
+ /// The WS-Management service cannot process the request because the selectors for the resource are ambiguous.
+ ERROR_WSMAN_AMBIGUOUS_SELECTORS = 0x8033805E,
+
+ /// The WS-Management service cannot process the request because the request contains duplicate selectors.
+ ERROR_WSMAN_DUPLICATE_SELECTORS = 0x8033805F,
+
+ ///
+ /// The WS-Management service cannot process the request because the request contains invalid selectors for the target resource.
+ ///
+ ERROR_WSMAN_INVALID_TARGET_SELECTORS = 0x80338060,
+
+ /// The WS-Management service cannot process the request because the request contains an invalid URI for the target resource.
+ ERROR_WSMAN_INVALID_TARGET_RESOURCEURI = 0x80338061,
+
+ /// The WS-Management service cannot process the request because the request contains an invalid target system.
+ ERROR_WSMAN_INVALID_TARGET_SYSTEM = 0x80338062,
+
+ /// The WS-Management service cannot process a Create request because the target already exists.
+ ERROR_WSMAN_TARGET_ALREADY_EXISTS = 0x80338063,
+
+ /// The WS-Management service does not support the mode of authorization.
+ ERROR_WSMAN_AUTHORIZATION_MODE_NOT_SUPPORTED = 0x80338064,
+
+ /// The client does not support acknowledgment.
+ ERROR_WSMAN_ACK_NOT_SUPPORTED = 0x80338065,
+
+ /// The data source does not support timeouts for the operation.
+ ERROR_WSMAN_OPERATION_TIMEOUT_NOT_SUPPORTED = 0x80338066,
+
+ /// The WS-Management service does not support the locale.
+ ERROR_WSMAN_LOCALE_NOT_SUPPORTED = 0x80338067,
+
+ /// The WS-Management service does not support the expiration time.
+ ERROR_WSMAN_EXPIRATION_TIME_NOT_SUPPORTED = 0x80338068,
+
+ /// The WS-Management service does not retry deliveries.
+ ERROR_WSMAN_DELIVERY_RETRIES_NOT_SUPPORTED = 0x80338069,
+
+ /// The event source does not support heartbeats.
+ ERROR_WSMAN_HEARTBEATS_NOT_SUPPORTED = 0x8033806A,
+
+ /// The event source does not support bookmarks.
+ ERROR_WSMAN_BOOKMARKS_NOT_SUPPORTED = 0x8033806B,
+
+ /// The WS-Management service does not support the configuration for MaxItems.
+ ERROR_WSMAN_MAXITEMS_NOT_SUPPORTED = 0x8033806C,
+
+ /// The WS-Management service does not support the configuration for MaxTime.
+ ERROR_WSMAN_MAXTIME_NOT_SUPPORTED = 0x8033806D,
+
+ /// The WS-Management service does not support the value in the configuration for MaxEnvelopeSize.
+ ERROR_WSMAN_MAXENVELOPE_SIZE_NOT_SUPPORTED = 0x8033806E,
+
+ /// The event source does not support the MaxEnvelopePolicy.
+ ERROR_WSMAN_MAXENVELOPE_POLICY_NOT_SUPPORTED = 0x8033806F,
+
+ /// The WS-Management service does not support unfiltered enumeration.
+ ERROR_WSMAN_FILTERING_REQUIRED_NOT_SUPPORTED = 0x80338070,
+
+ /// The WS-Management service does not support insecure addresses.
+ ERROR_WSMAN_INSECURE_ADDRESS_NOT_SUPPORTED = 0x80338071,
+
+ /// The WS-Management service does not support format mismatch.
+ ERROR_WSMAN_FORMAT_MISMATCH_NOT_SUPPORTED = 0x80338072,
+
+ /// The WS-Management service does not support the format of the security token.
+ ERROR_WSMAN_FORMAT_SECURITY_TOKEN_NOT_SUPPORTED = 0x80338073,
+
+ /// The service returned a response that indicates that the method is unsupported.
+ ERROR_WSMAN_BAD_METHOD = 0x80338074,
+
+ /// The WS-Management service does not support the specified media type.
+ ERROR_WSMAN_UNSUPPORTED_MEDIA = 0x80338075,
+
+ /// The WS-Management service does not support the addressing mode.
+ ERROR_WSMAN_UNSUPPORTED_ADDRESSING_MODE = 0x80338076,
+
+ /// The WS-Management service does not support fragment transfer.
+ ERROR_WSMAN_FRAGMENT_TRANSFER_NOT_SUPPORTED = 0x80338077,
+
+ /// The client sent a request before the enumeration was initialized.
+ ERROR_WSMAN_ENUMERATION_INITIALIZING = 0x80338078,
+
+ /// The WS-Management service failed to locate the component that can process the request.
+ ERROR_WSMAN_CONNECTOR_GET = 0x80338079,
+
+ /// A syntax error occurred in the query string for the resource URI.
+ ERROR_WSMAN_URI_QUERY_STRING_SYNTAX_ERROR = 0x8033807A,
+
+ /// The MAC that is configured is not in the list of enabled DHCP adapters on the computer.
+ ERROR_WSMAN_INEXISTENT_MAC_ADDRESS = 0x8033807B,
+
+ /// The MAC address that is configured does not have any unicast addresses.
+ ERROR_WSMAN_NO_UNICAST_ADDRESSES = 0x8033807C,
+
+ /// The WS-Management service cannot find the dynamic IP address on the adapter with the configured MAC address.
+ ERROR_WSMAN_NO_DHCP_ADDRESSES = 0x8033807D,
+
+ /// The WS-Management service cannot process the request because the envelope size in the request is too small.
+ ERROR_WSMAN_MIN_ENVELOPE_SIZE = 0x8033807E,
+
+ ///
+ /// The WS-Management service cannot process the request. The EndPointReference contains more nested EndPointReferences than
+ /// WS-Management supports.
+ ///
+ ERROR_WSMAN_EPR_NESTING_EXCEEDED = 0x8033807F,
+
+ /// The WS-Management service cannot initialize the request.
+ ERROR_WSMAN_REQUEST_INIT_ERROR = 0x80338080,
+
+ /// The WS-Management service cannot process the request because the timeout header in the request is invalid.
+ ERROR_WSMAN_INVALID_TIMEOUT_HEADER = 0x80338081,
+
+ /// The WS-Management service cannot find the certificate that was requested.
+ ERROR_WSMAN_CERT_NOT_FOUND = 0x80338082,
+
+ /// The WS-Management service cannot process the request. The data source failed to return results for the request.
+ ERROR_WSMAN_PLUGIN_FAILED = 0x80338083,
+
+ /// The enumeration is invalid because previous Pull request failed.
+ ERROR_WSMAN_ENUMERATION_INVALID = 0x80338084,
+
+ /// The WS-Management service cannot change a mutual configuration.
+ ERROR_WSMAN_CONFIG_CANNOT_CHANGE_MUTUAL = 0x80338085,
+
+ /// The WS-Management service does not support the specified enumeration mode.
+ ERROR_WSMAN_ENUMERATION_MODE_UNSUPPORTED = 0x80338086,
+
+ ///
+ /// The WS-Management service cannot guarantee that all data is returned in the requested locale as some data sources may not be able
+ /// to comply. Resend the remote request with locale as a hint (the SOAP header should have mustUnderstand="false")
+ ///
+ ERROR_WSMAN_MUSTUNDERSTAND_ON_LOCALE_UNSUPPORTED = 0x80338087,
+
+ /// The WSMan group policy configuration is corrupted.
+ ERROR_WSMAN_POLICY_CORRUPTED = 0x80338088,
+
+ ///
+ /// The listener address specified is invalid. The address can be specified in one of the following formats: *,
+ /// IP:<ip_address>, MAC:<mac_address>. Change the listener address and try the request again.
+ ///
+ ERROR_WSMAN_LISTENER_ADDRESS_INVALID = 0x80338089,
+
+ /// Cannot change GPO controlled setting.
+ ERROR_WSMAN_CONFIG_CANNOT_CHANGE_GPO_CONTROLLED_SETTING = 0x8033808A,
+
+ /// The client is attempting to concurrently receive events from a single subscription session.This is not supported.
+ ERROR_WSMAN_EVENTING_CONCURRENT_CLIENT_RECEIVE = 0x8033808B,
+
+ ///
+ /// The source is sending event batches faster than the subscriber can consume. This can happen if acknowledgments are not specified
+ /// for the subscription and new events are arriving from the source before the client has consumed them.
+ ///
+ ERROR_WSMAN_EVENTING_FAST_SENDER = 0x8033808C,
+
+ /// The source is sending events in a connection that did not match the security restrictions imposed by the client.
+ ERROR_WSMAN_EVENTING_INSECURE_PUSHSUBSCRIPTION_CONNECTION = 0x8033808D,
+
+ ///
+ /// The WS-Management client cannot process the request. The event source identity does not match the identity of the machine that
+ /// the client subscribed to.
+ ///
+ ERROR_WSMAN_EVENTING_INVALID_EVENTSOURCE = 0x8033808E,
+
+ /// The client could not start a valid listener to receive subscription events based on the specified input settings.
+ ERROR_WSMAN_EVENTING_NOMATCHING_LISTENER = 0x8033808F,
+
+ /// The fragment path dialect is not supported for this resource.
+ ERROR_WSMAN_FRAGMENT_DIALECT_REQUESTED_UNAVAILABLE = 0x80338090,
+
+ /// Cannot execute the Fragment-Level operation. The fragment path cannot be missing if the fragment dialect is specified.
+ ERROR_WSMAN_MISSING_FRAGMENT_PATH = 0x80338091,
+
+ /// Cannot execute the Fragment-Level operation because of invalid value for the fragment dialect.
+ ERROR_WSMAN_INVALID_FRAGMENT_DIALECT = 0x80338092,
+
+ ///
+ /// Cannot execute the Fragment-Level operation because the fragment path is invalid. Check the syntax of the fragment path string.
+ /// Also check the spelling and the case of the property names in the fragment path string: they have to match the spelling and the
+ /// case of the resource properties.
+ ///
+ ERROR_WSMAN_INVALID_FRAGMENT_PATH = 0x80338093,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management UnsupportedFeature, details= /FormatMismatch The specified batch parameter is
+ /// incompatible with the specified event delivery mode. This can happen if batchSettings for a specific mode are passed for a
+ /// different mode. For example, batchSettings like "MaxItems" and "MaxLatency" are not compatible with single event push mode or
+ /// pull mode.
+ ///
+ ERROR_WSMAN_EVENTING_INCOMPATIBLE_BATCHPARAMS_AND_DELIVERYMODE = 0x80338094,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Eventing EventSourceUnableToProcess, details= /UnusableAddress The connectivity test from the push
+ /// subscription source to the client failed. This can happen if the client machine initiating the push subscription is unreachable
+ /// from the server machine where the event source is located. Possible reasons include firewall or some other network boundary.
+ /// Modify subscription to use Pull based subscription.
+ ///
+ ERROR_WSMAN_EVENTING_LOOPBACK_TESTFAILED = 0x80338095,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management UnsupportedFeature, details= /AddressingMode The subscribe packet had an EndTo element
+ /// address that does not match the NotifyTo element address or it was invalid. For subscription the EndTo element need not be
+ /// present in the subscription request. If it exists then it's address should match the address specified in NotifyTo element.
+ ///
+ ERROR_WSMAN_EVENTING_INVALID_ENDTO_ADDRESSS = 0x80338096,
+
+ ///
+ /// The event source sent an event packet whose header could not be processed by the client. This can happen if it was malformed or
+ /// if the header had a mustUnderstand attribute that could not be understood by the client.
+ ///
+ ERROR_WSMAN_EVENTING_INVALID_INCOMING_EVENT_PACKET_HEADER = 0x80338097,
+
+ ///
+ /// An operation is being attempted on a session that is being closed.This can happen if the session that is being used is also being
+ /// closed by another thread.
+ ///
+ ERROR_WSMAN_SESSION_ALREADY_CLOSED = 0x80338098,
+
+ ///
+ /// The listener on which the subscription session was established is no longer valid. This can happen if the WSMAN service listener
+ /// configuration has been changed and a subscription was already active and using one of the configurations that was deleted.
+ ///
+ ERROR_WSMAN_SUBSCRIPTION_LISTENER_NOLONGERVALID = 0x80338099,
+
+ /// The system failed to load the plugin.
+ ERROR_WSMAN_PROVIDER_LOAD_FAILED = 0x8033809A,
+
+ ///
+ /// wse, code=Receiver, subcode=WS Eventing SourceShuttingDown, details=, The WS-Management service on the remote machine with which
+ /// this subscription had been set up has requested that the subscription be closed. This can happen if the WS-Management service on
+ /// the remote machine was being shutdown. To correct this problem restart the WS-Management service on the remote machine and
+ /// re-create the subscription.
+ ///
+ ERROR_WSMAN_EVENTING_SUBSCRIPTIONCLOSED_BYREMOTESERVICE = 0x8033809B,
+
+ ///
+ /// wse, code=Receiver, subcode=WS Eventing DeliveryFailure, details=, The event source was unable to deliver events to the
+ /// client.This can happen due to network issues preventing the source from connecting to the client.
+ ///
+ ERROR_WSMAN_EVENTING_DELIVERYFAILED_FROMSOURCE = 0x8033809C,
+
+ /// An unknown security error occurred.
+ ERROR_WSMAN_SECURITY_UNMAPPED = 0x8033809D,
+
+ /// wse, code=Receiver, subcode=WS Eventing SourceCancelling, details=, The event source cancelled the subscription session.
+ ERROR_WSMAN_EVENTING_SUBSCRIPTION_CANCELLED_BYSOURCE = 0x8033809E,
+
+ /// TrustedHosts list contains an invalid hostname or hostname pattern.
+ ERROR_WSMAN_INVALID_HOSTNAME_PATTERN = 0x8033809F,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management UnsupportedFeature, details= /AddressingMode The subscribe packet does not have
+ /// NotifyTo element in the delivery section.
+ ///
+ ERROR_WSMAN_EVENTING_MISSING_NOTIFYTO = 0x803380A0,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management UnsupportedFeature, details= /AddressingMode The subscribe packet does not have Address
+ /// element in the NotifyTo section.
+ ///
+ ERROR_WSMAN_EVENTING_MISSING_NOTIFYTO_ADDRESSS = 0x803380A1,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management UnsupportedFeature, details= /AddressingMode The subscribe packet contains invalid
+ /// Address in the NotifyTo section.
+ ///
+ ERROR_WSMAN_EVENTING_INVALID_NOTIFYTO_ADDRESSS = 0x803380A2,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management UnsupportedFeature, details= /AddressingMode The subscribe packet contains invalid
+ /// Locale value in the delivery section.
+ ///
+ ERROR_WSMAN_EVENTING_INVALID_LOCALE_IN_DELIVERY = 0x803380A3,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management UnsupportedFeature, details= /AddressingMode The subscribe packet contains invalid
+ /// heartbeat value.
+ ///
+ ERROR_WSMAN_EVENTING_INVALID_HEARTBEAT = 0x803380A4,
+
+ /// The WS-Management service cannot process the request. This request is valid only when the -remote option is specified.
+ ERROR_WSMAN_MACHINE_OPTION_REQUIRED = 0x803380A5,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management UnsupportedFeature, details=/OptionSet The WS-Management service does not support the
+ /// options feature for the specified resource. Remove the options from the request and retry.
+ ///
+ ERROR_WSMAN_UNSUPPORTED_FEATURE_OPTIONS = 0x803380A6,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management UnsupportedFeature, details= /AddressingMode The subscribe packet contains batch size
+ /// value which is smaller than supported value.
+ ///
+ ERROR_WSMAN_BATCHSIZE_TOO_SMALL = 0x803380A7,
+
+ ///
+ /// wse, code=Sender, subcode=WS-Eventing DeliveryModeRequestedUnavailable, details=List of delivery modes that are supported The
+ /// WS-Management service cannot process the subscribe request. The delivery mode is either invalid or missing.
+ ///
+ ERROR_WSMAN_EVENTING_DELIVERY_MODE_REQUESTED_INVALID = 0x803380A8,
+
+ /// The WS-Management service cannot process the request. The provider method was not found.
+ ERROR_WSMAN_PROVSYS_NOT_SUPPORTED = 0x803380A9,
+
+ ///
+ /// The WinRM client could not create a push subscription because there are no listeners configured that match the specified hostname
+ /// and transport, or because there is no enabled firewall exception on the port used by the selected listener. Change the hostname
+ /// and transport, create an appropriate firewall exception, or run winrm quickconfig.
+ ///
+ ERROR_WSMAN_PUSH_SUBSCRIPTION_CONFIG_INVALID = 0x803380AA,
+
+ ///
+ /// The WinRM client could not process the request because credentials were specified along with the 'no authentication' flag. No
+ /// user name, password or client certificate should be specified with the 'no authentication' option.
+ ///
+ ERROR_WSMAN_CREDS_PASSED_WITH_NO_AUTH_FLAG = 0x803380AB,
+
+ ///
+ /// The WinRM client cannot process the request. An invalid flag was specified for this request. Remove or change the invalid flag
+ /// and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_FLAG = 0x803380AC,
+
+ ///
+ /// The WinRM client cannot process the request. The request must specify only one authentication mechanism. If the No Authentication
+ /// flag is set, no authentication mechanism should be specified. Change the request to specify only one authentication mechanism or
+ /// 'no authentication' and try again.
+ ///
+ ERROR_WSMAN_CLIENT_MULTIPLE_AUTH_FLAGS = 0x803380AD,
+
+ ///
+ /// The WinRM client cannot process the request. The SPN Server Port can only be used when the authentication mechanism is Negotiate
+ /// or Kerberos. Remove the SPN Server Port or change the authentication mechanism and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_SPN_WRONG_AUTH = 0x803380AE,
+
+ ///
+ /// The WinRM client cannot process the request. The request must not include credentials when using a smart card or default
+ /// certificate. Remove the credentials or change the authentication mechanism and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_CERT_UNNEEDED_CREDS = 0x803380AF,
+
+ ///
+ /// The WinRM client cannot process the request. Requests must include user name and password when Basic or Digest authentication
+ /// mechanism is used. Add the user name and password or change the authentication mechanism and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_USERNAME_PASSWORD_NEEDED = 0x803380B0,
+
+ ///
+ /// The WinRM client cannot process the request. Requests must not include user name and password when a certificate is used for
+ /// authentication. Remove the user name and password or change the authentication mechanism and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_CERT_UNNEEDED_USERNAME = 0x803380B1,
+
+ ///
+ /// The WinRM client cannot process the request. Requests must include credentials if they specify the following flag:
+ /// WSManFlagCredUsernamePassword. Add the credentials or remove the WSManFlagCredUsernamePassword flag and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_CREDENTIALS_NEEDED = 0x803380B2,
+
+ ///
+ /// The WinRM client cannot process the request. Requests with credentials must include the following flag:
+ /// WSManFlagCredUsernamePassword. Add the flag or remove the credentials and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_CREDENTIALS_FLAG_NEEDED = 0x803380B3,
+
+ ///
+ /// The WinRM client cannot process the request. Requests must include the certificate thumbprint when a certificate is used for
+ /// authentication. Change the request to include the certificate thumbprint and try again.
+ ///
+ ERROR_WSMAN_CLIENT_CERT_NEEDED = 0x803380B4,
+
+ ///
+ /// The WinRM client cannot process the request. Requests must include the type of certificate to use for authentication. Change the
+ /// request to include the type of the certificate and try again.
+ ///
+ ERROR_WSMAN_CLIENT_CERT_UNKNOWN_TYPE = 0x803380B5,
+
+ ///
+ /// The WinRM client cannot process the request. Requests must include the location (machine or user certificate store) of the
+ /// certificate used for authentication. Change the request to include the location of the certificate and try again.
+ ///
+ ERROR_WSMAN_CLIENT_CERT_UNKNOWN_LOCATION = 0x803380B6,
+
+ ///
+ /// The WinRM client cannot process the request. The certificate structure was incomplete. Change the certificate structure and try
+ /// the request again.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_CERT = 0x803380B7,
+
+ ///
+ /// The WinRM client cannot process the request. Credentials must not be provided for local requests. Remove the credentials and try
+ /// the request again.
+ ///
+ ERROR_WSMAN_CLIENT_LOCAL_INVALID_CREDS = 0x803380B8,
+
+ ///
+ /// The WinRM client cannot process the request. Connection options must not be provided for local requests. Remove the connection
+ /// options and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_LOCAL_INVALID_CONNECTION_OPTIONS = 0x803380B9,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManCreateSession function is null or zero.
+ /// Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_CREATESESSION_NULL_PARAM = 0x803380BA,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManEnumerate function is null or zero.
+ /// Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_ENUMERATE_NULL_PARAM = 0x803380BB,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManSubscribe function is null or zero.
+ /// Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_SUBSCRIBE_NULL_PARAM = 0x803380BC,
+
+ ///
+ /// The WinRM client cannot process the request. The parameter that should contain the result of the request is null. Change the
+ /// request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_NULL_RESULT_PARAM = 0x803380BD,
+
+ ///
+ /// The WinRM client cannot process the request. The request is missing the session or enumeration handle. Change the request to
+ /// include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_NO_HANDLE = 0x803380BE,
+
+ ///
+ /// The WinRM client cannot process the request. The resource URI must not be "" (blank or empty string) or NULL. Change the resource
+ /// URI and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_BLANK_URI = 0x803380BF,
+
+ ///
+ /// The WinRM client cannot process the request. The resource locator was invalid. Change the resource locator and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_RESOURCE_LOCATOR = 0x803380C0,
+
+ ///
+ /// The WinRM client cannot process the request. The input XML must not be "" (blank or empty string) or NULL. Change the input XML
+ /// and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_BLANK_INPUT_XML = 0x803380C1,
+
+ ///
+ /// The WinRM client cannot process the request. The maximum number of elements to be retrieved in a batch is too small. Change the
+ /// value for the maximum number of elements in a batch and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_BATCH_ITEMS_TOO_SMALL = 0x803380C2,
+
+ ///
+ /// The WinRM client cannot process the request. The maximum number of characters to be retrieved in a batch is too small. Change the
+ /// value for the maximum number of characters in a batch and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_MAX_CHARS_TOO_SMALL = 0x803380C3,
+
+ ///
+ /// The WinRM client cannot process the request. The action URI must not be "" (blank or empty string) or NULL. Change the action URI
+ /// and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_BLANK_ACTION_URI = 0x803380C4,
+
+ ///
+ /// The WinRM client cannot process the request. The heartbeat interval must be greater than 0. Change the heartbeat interval and try
+ /// the request again.
+ ///
+ ERROR_WSMAN_CLIENT_ZERO_HEARTBEAT = 0x803380C5,
+
+ ///
+ /// The WinRM client cannot process the request. The request must contain one and only one delivery mode. Change the request to
+ /// contain only one delivery mode and try again.
+ ///
+ ERROR_WSMAN_CLIENT_MULTIPLE_DELIVERY_MODES = 0x803380C6,
+
+ ///
+ /// The WinRM client cannot process the request. The request contained multiple settings for the policy regarding the maximum
+ /// envelope size. Change the request to contain only one setting for the policy and try again.
+ ///
+ ERROR_WSMAN_CLIENT_MULTIPLE_ENVELOPE_POLICIES = 0x803380C7,
+
+ ///
+ /// The WinRM client cannot process the request. The request contained an expiration time, but did not specify if it was absolute or
+ /// relative. Change the request to specify the type of the expiration time (absolute or relative) and try again.
+ ///
+ ERROR_WSMAN_CLIENT_UNKNOWN_EXPIRATION_TYPE = 0x803380C8,
+
+ ///
+ /// The WinRM client cannot process the request. The request specified the type of the expiration time (absolute or relative) but it
+ /// did not contain an expiration time. Change the request to include the expiration time and try again.
+ ///
+ ERROR_WSMAN_CLIENT_MISSING_EXPIRATION = 0x803380C9,
+
+ ///
+ /// The WinRM client cannot process the request. The pull subscription request contained flags related to a push subscription. Change
+ /// the flags and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_PULL_INVALID_FLAGS = 0x803380CA,
+
+ ///
+ /// The WinRM client cannot process the request because the push subscription request contained an unsupported delivery transport.
+ /// HTTP and HTTPS are the only currently supported transports. Change the delivery transport and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_PUSH_UNSUPPORTED_TRANSPORT = 0x803380CB,
+
+ ///
+ /// The WinRM client cannot process the request. The delivery address for push subscriptions was too long. Change the delivery
+ /// address and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_PUSH_HOST_TOO_LONG = 0x803380CC,
+
+ ///
+ /// The WinRM client cannot process the request. The request contained the compression option but contained an unrecognized value.
+ /// Change the value for the compression option and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_COMPRESSION_INVALID_OPTION = 0x803380CD,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManDeliverEndSubscriptionNotification
+ /// function is null or zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_DELIVERENDSUBSCRIPTION_NULL_PARAM = 0x803380CE,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManDeliverEvents function is null or zero.
+ /// Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_DELIVEREVENTS_NULL_PARAM = 0x803380CF,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManGetBookmark function is null or zero.
+ /// Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_GETBOOKMARK_NULL_PARAM = 0x803380D0,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManDecodeObject function is null or zero.
+ /// Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_DECODEOBJECT_NULL_PARAM = 0x803380D1,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManEncodeObject(Ex) function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_ENCODEOBJECT_NULL_PARAM = 0x803380D2,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManEnumeratorAddObject function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_ENUMERATORADDOBJECT_NULL_PARAM = 0x803380D3,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManEnumeratorNextObject function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_ENUMERATORNEXTOBJECT_NULL_PARAM = 0x803380D4,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManConstructError function is null or zero.
+ /// Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_CONSTRUCTERROR_NULL_PARAM = 0x803380D5,
+
+ ///
+ /// The WinRM service cannot process the request. Push subscriptions are not supported for local session. Change subscription type to
+ /// Pull and try again.
+ ///
+ ERROR_WSMAN_SERVER_NONPULLSUBSCRIBE_NULL_PARAM = 0x803380D6,
+
+ ///
+ /// The WinRM client cannot process the request. The unencrypted flag only applies to the HTTP transport. Remove the unencrypted flag
+ /// or change the transport and try again the request.
+ ///
+ ERROR_WSMAN_CLIENT_UNENCRYPTED_HTTP_ONLY = 0x803380D7,
+
+ ///
+ /// The WinRM client cannot process the request. Certificate parameters are not valid when the HTTP transport is also specified.
+ /// Remove the certificate parameters or change the transport and try again the request.
+ ///
+ ERROR_WSMAN_CANNOT_USE_CERTIFICATES_FOR_HTTP = 0x803380D8,
+
+ ///
+ /// The WinRM client cannot process the request. The connection string should be of the form
+ /// [<transport>://]<host>[:<port>][/<suffix>] where transport is one of "http" or "https". Transport, port
+ /// and suffix are optional. The host may be a hostname or an IP address. For IPv6 addresses, enclose the address in brackets - e.g.
+ /// "http://[1::2]:80/wsman". Change the connection string and try the request again.
+ ///
+ ERROR_WSMAN_CONNECTIONSTR_INVALID = 0x803380D9,
+
+ ///
+ /// The WinRM client cannot process the request. The connection string contains an unsupported transport. Valid transports are "http"
+ /// or "https". Change the connection string and try the request again.
+ ///
+ ERROR_WSMAN_TRANSPORT_NOT_SUPPORTED = 0x803380DA,
+
+ ///
+ /// The WinRM client cannot process the request because the port specified in the connection string is not valid. Verify the port and
+ /// retry the request. Valid values are between 1 and 65535. Change the value for port and try the request again.
+ ///
+ ERROR_WSMAN_PORT_INVALID = 0x803380DB,
+
+ ///
+ /// The WinRM client cannot process the request. The port specified in the configuration is invalid. Valid values are between 1 and
+ /// 65535. Change the value for port and try the request again.
+ ///
+ ERROR_WSMAN_CONFIG_PORT_INVALID = 0x803380DC,
+
+ ///
+ /// The WinRM service cannot process the request. WSMAN_FLAG_SEND_HEARTBEAT flag requires the event enumerator to be empty. Change
+ /// the flag or change the event enumerator and try the request again.
+ ///
+ ERROR_WSMAN_SENDHEARBEAT_EMPTY_ENUMERATOR = 0x803380DD,
+
+ ///
+ /// The WinRM client cannot process the request. Unencrypted traffic is currently disabled in the client configuration. Change the
+ /// client configuration and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_UNENCRYPTED_DISABLED = 0x803380DE,
+
+ ///
+ /// The WinRM client cannot process the request. Basic authentication is currently disabled in the client configuration. Change the
+ /// client configuration and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_BASIC_AUTHENTICATION_DISABLED = 0x803380DF,
+
+ ///
+ /// The WinRM client cannot process the request. Digest authentication is currently disabled in the client configuration. Change the
+ /// client configuration and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_DIGEST_AUTHENTICATION_DISABLED = 0x803380E0,
+
+ ///
+ /// The WinRM client cannot process the request. Negotiate authentication is currently disabled in the client configuration. Change
+ /// the client configuration and try the request again. If this is a request for the local configuration, use one of the enabled
+ /// authentication mechanisms still enabled. To use Kerberos, specify the local computer name as the remote destination. To use
+ /// Basic, specify the local computer name as the remote destination, specify Basic authentication and provide user name and password.
+ ///
+ ERROR_WSMAN_CLIENT_NEGOTIATE_AUTHENTICATION_DISABLED = 0x803380E1,
+
+ ///
+ /// The WinRM client cannot process the request. Kerberos authentication is currently disabled in the client configuration. Change
+ /// the client configuration and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_KERBEROS_AUTHENTICATION_DISABLED = 0x803380E2,
+
+ ///
+ /// The WinRM client cannot process the request. Certificate authentication is currently disabled in the client configuration. Change
+ /// the client configuration and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_CERTIFICATES_AUTHENTICATION_DISABLED = 0x803380E3,
+
+ ///
+ /// The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or if the client computer
+ /// is not joined to a domain, then HTTPS transport must be used or the destination machine must be added to the TrustedHosts
+ /// configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be
+ /// authenticated. You can get more information about that by running the following command: winrm help config.
+ ///
+ ERROR_WSMAN_SERVER_NOT_TRUSTED = 0x803380E4,
+
+ ///
+ /// The WinRM client cannot process the request. Default credentials with Negotiate over HTTP can be used only if the target machine
+ /// is part of the TrustedHosts list or the Allow implicit credentials for Negotiate option is specified.
+ ///
+ ERROR_WSMAN_EXPLICIT_CREDENTIALS_REQUIRED = 0x803380E5,
+
+ ///
+ /// The WinRM client cannot process the request. The CertificateThumbprint property must be empty when the SSL configuration will be
+ /// shared with another service.
+ ///
+ ERROR_WSMAN_CERT_THUMBPRINT_NOT_BLANK = 0x803380E6,
+
+ ///
+ /// The WinRM client cannot process the request. The CertificateThumbprint property must not be "" (blank or empty string) or NULL.
+ ///
+ ERROR_WSMAN_CERT_THUMBPRINT_BLANK = 0x803380E7,
+
+ ///
+ /// The WinRM client cannot process the request. The WinRM client tried to create an SSL configuration for a pair of IP address and
+ /// port according to the request, but the SSL configuration for that pair is owned by another service and cannot be shared. Use a
+ /// different IP address and port combination and try the request again.
+ ///
+ ERROR_WSMAN_CONFIG_CANNOT_SHARE_SSL_CONFIG = 0x803380E8,
+
+ /// The WinRM client cannot process the request. The certificate CN and the hostname that were provided do not match.
+ ERROR_WSMAN_CONFIG_CERT_CN_DOES_NOT_MATCH_HOSTNAME = 0x803380E9,
+
+ /// Not used
+ ERROR_WSMAN_CONFIG_HOSTNAME_CHANGE_WITHOUT_CERT = 0x803380EA,
+
+ ///
+ /// The WinRM client cannot process the request. When HTTP is the transport, the Certificate thumbprint must be blank. HTTP does not
+ /// use the Certificate thumbprint.
+ ///
+ ERROR_WSMAN_CONFIG_THUMBPRINT_SHOULD_BE_EMPTY = 0x803380EB,
+
+ ///
+ /// The WinRM client cannot process the request. The IP Filter is invalid. Ranges are specified using the syntax IP1-IP2. Multiple
+ /// ranges are separated using , as delimiter. * is used to indicate that the service should listen on all available IPs on the
+ /// machine. When * is used, other ranges in the filter are ignored. If filter is blank, the service doesn't listen on any address.
+ /// For example, if service should be restricted to listen on only IPv4 addresses, IPv6 filter should be left empty. %nExample IPv4
+ /// filters: 2.0.0.1-2.0.0.20, 24.0.0.1-24.0.0.22 %n Example IPv6 filters: 3FFE:FFFF:7654:FEDA:1245:BA98:0000:0000-3FFE:FFFF:7654:FEDA:1245:BA98:3210:4562
+ ///
+ ERROR_WSMAN_INVALID_IPFILTER = 0x803380EC,
+
+ ///
+ /// The WinRM client cannot process the request. The input XML modifies selectors or keys for the instance. You cannot create a new
+ /// instance or change the identity of an instance by changing the keys. Change the input XML and try the request again.
+ ///
+ ERROR_WSMAN_CANNOT_CHANGE_KEYS = 0x803380ED,
+
+ ///
+ /// The WinRM client cannot process the request. The Enhanced Key Usage (EKU) field of the certificate is not set to "Server
+ /// Authentication". Retry the request with a certificate that has the correct EKU.
+ ///
+ ERROR_WSMAN_CERT_INVALID_USAGE = 0x803380EE,
+
+ /// The WinRM client cannot process the request. The response from the destination computer does not include any results.
+ ERROR_WSMAN_RESPONSE_NO_RESULTS = 0x803380EF,
+
+ ///
+ /// The WinRM client cannot process the request. The response to a create request did not contain a valid end point reference. The
+ /// ResourceCreated element was not found or did not contain valid content.
+ ///
+ ERROR_WSMAN_CREATE_RESPONSE_NO_EPR = 0x803380F0,
+
+ ///
+ /// The WinRM client cannot process the request. The response from the destination computer does not contain a valid SOAP enumeration context.
+ ///
+ ERROR_WSMAN_RESPONSE_INVALID_ENUMERATION_CONTEXT = 0x803380F1,
+
+ ///
+ /// The WinRM client cannot process the request. The response from the destination computer contains a WS-Management FragmentTransfer
+ /// header but the content of the body is not wrapped by the WS-Management XmlFragment wrapper.
+ ///
+ ERROR_WSMAN_RESPONSE_NO_XML_FRAGMENT_WRAPPER = 0x803380F2,
+
+ ///
+ /// The WinRM client cannot process the request. The response from the destination computer contains one or more invalid SOAP headers.
+ ///
+ ERROR_WSMAN_RESPONSE_INVALID_MESSAGE_INFORMATION_HEADER = 0x803380F3,
+
+ ///
+ /// The WinRM client cannot process the request. It cannot find any SOAP Headers or Body elements in the response from the
+ /// destination computer.
+ ///
+ ERROR_WSMAN_RESPONSE_NO_SOAP_HEADER_BODY = 0x803380F4,
+
+ /// The WinRM client cannot process the request. The destination computer returned an empty response to the request.
+ ERROR_WSMAN_HTTP_NO_RESPONSE_DATA = 0x803380F5,
+
+ /// The WinRM client cannot process the request. The destination computer returned an invalid SOAP fault.
+ ERROR_WSMAN_RESPONSE_INVALID_SOAP_FAULT = 0x803380F6,
+
+ ///
+ /// The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from the destination
+ /// computer. The content type is absent or invalid.
+ ///
+ ERROR_WSMAN_HTTP_INVALID_CONTENT_TYPE_IN_RESPONSE_DATA = 0x803380F7,
+
+ ///
+ /// The WinRM client cannot process the request. The HTTP response from the destination computer was not in the same format as the
+ /// request. A Unicode request packet may have been sent and an ANSI packet received.
+ ///
+ ERROR_WSMAN_HTTP_CONTENT_TYPE_MISSMATCH_RESPONSE_DATA = 0x803380F8,
+
+ ///
+ /// The WinRM client cannot process the request. The encrypted message body has an invalid format and cannot be decrypted. Ensure
+ /// that the service is encrypting the message body according to the specifications.
+ ///
+ ERROR_WSMAN_CANNOT_DECRYPT = 0x803380F9,
+
+ ///
+ /// The WinRM client cannot process the request. The resource URI is not valid: it does not contain keys, but the class selected is
+ /// not a singleton. To access an instance which is not a singleton, keys must be provided. Use the following command to get more
+ /// information in how to construct a resource URI: "winrm help uris".
+ ///
+ ERROR_WSMAN_INVALID_URI_WMI_SINGLETON = 0x803380FA,
+
+ ///
+ /// The WinRM client cannot process the request. The resource URI for an enumeration operation with WQL filter must not contain keys
+ /// and the class name must be '*' (star). Use the following command to get more information in how to construct a resource URI:
+ /// "winrm help uris".
+ ///
+ ERROR_WSMAN_INVALID_URI_WMI_ENUM_WQL = 0x803380FB,
+
+ /// The WS-Management identification operation is only available on remote sessions.
+ ERROR_WSMAN_NO_IDENTIFY_FOR_LOCAL_SESSION = 0x803380FC,
+
+ /// Subscribe operation with Push delivery mode is only available on remote sessions.
+ ERROR_WSMAN_NO_PUSH_SUBSCRIPTION_FOR_LOCAL_SESSION = 0x803380FD,
+
+ ///
+ /// The subscription manager address is invalid. The response was not received from the address to which the subscription request was sent.
+ ///
+ ERROR_WSMAN_INVALID_SUBSCRIPTION_MANAGER = 0x803380FE,
+
+ /// Only subscriptions with Pull delivery mode are supported by the plugin.
+ ERROR_WSMAN_NON_PULL_SUBSCRIPTION_NOT_SUPPORTED = 0x803380FF,
+
+ /// WinRM cannot process the request because the WMI object contains too many levels of nested embedded objects.
+ ERROR_WSMAN_WMI_MAX_NESTED = 0x80338100,
+
+ ///
+ /// The WS-Management service cannot process the request. It does not support retrieving a WMI object that contains a property of
+ /// type CIM_REFERENCE and the value of that property contains a remote machine name.
+ ///
+ ERROR_WSMAN_REMOTE_CIMPATH_NOT_SUPPORTED = 0x80338101,
+
+ ///
+ /// The WS-Management service cannot process the request. The WMI service reported that the WMI provider could not perform the
+ /// requested operation.
+ ///
+ ERROR_WSMAN_WMI_PROVIDER_NOT_CAPABLE = 0x80338102,
+
+ ///
+ /// The WS-Management service cannot process the request. A value retrieved from the WMI service or the WMI provider is invalid.
+ ///
+ ERROR_WSMAN_WMI_INVALID_VALUE = 0x80338103,
+
+ /// The WS-Management service cannot process the request. The WMI service returned an 'access denied' error.
+ ERROR_WSMAN_WMI_SVC_ACCESS_DENIED = 0x80338104,
+
+ /// The WS-Management service cannot process the request. The WMI provider returned an 'access denied' error.
+ ERROR_WSMAN_WMI_PROVIDER_ACCESS_DENIED = 0x80338105,
+
+ ///
+ /// The WS-Management service cannot process the request. An 'access denied' error was received when connecting to the WMI service on
+ /// the computer specified.
+ ///
+ ERROR_WSMAN_WMI_CANNOT_CONNECT_ACCESS_DENIED = 0x80338106,
+
+ /// The WS-Management service cannot process the request because the filter XML is invalid.
+ ERROR_WSMAN_INVALID_FILTER_XML = 0x80338107,
+
+ ///
+ /// The WS-Management service cannot process the request. The resource URI for an Enumerate operation must not contain keys.
+ ///
+ ERROR_WSMAN_ENUMERATE_WMI_INVALID_KEY = 0x80338108,
+
+ ///
+ /// Cannot execute the Fragment-Level operation because the fragment path contains either "" (blank or empty string) or NULL. Change
+ /// the value of the fragment path and try the request again.
+ ///
+ ERROR_WSMAN_INVALID_FRAGMENT_PATH_BLANK = 0x80338109,
+
+ ///
+ /// The WinRM client cannot process the request. The response received from the destination machine contains invalid characters and
+ /// cannot be processed.
+ ///
+ ERROR_WSMAN_INVALID_CHARACTERS_IN_RESPONSE = 0x8033810A,
+
+ ///
+ /// The WinRM client cannot process the request. Kerberos authentication cannot be used when the destination is an IP address.
+ /// Specify a DNS or NetBIOS destination or specify Basic or Negotiate authentication.
+ ///
+ ERROR_WSMAN_KERBEROS_IPADDRESS = 0x8033810B,
+
+ ///
+ /// The WinRM client cannot process the request. Kerberos authentication cannot be used with implicit credentials if the client
+ /// computer is not joined to a domain. Use explicit credentials or specify a different authentication mechanism than Kerberos.
+ ///
+ ERROR_WSMAN_CLIENT_WORKGROUP_NO_KERBEROS = 0x8033810C,
+
+ /// The WinRM client cannot process the request. The batch settings parameter is invalid.
+ ERROR_WSMAN_INVALID_BATCH_SETTINGS_PARAMETER = 0x8033810D,
+
+ ///
+ /// The WinRM client cannot process the request. If you do not specify an authentication mechanism or you specify Kerberos, then you
+ /// cannot use "localhost" or "127.0.0.1" or "[::1]" for the remote host name. You can explicitly specify a different authentication
+ /// mechanism than Kerberos or specify the remote host as a DNS name or NetBIOS name.
+ ///
+ ERROR_WSMAN_SERVER_DESTINATION_LOCALHOST = 0x8033810E,
+
+ /// The WinRM client received an unknown HTTP status code from the remote WS-Management service.
+ ERROR_WSMAN_UNKNOWN_HTTP_STATUS_RETURNED = 0x8033810F,
+
+ ///
+ /// This error message is deprecated The WinRM client received a HTTP redirect status code from the remote WS-Management service.
+ /// WinRM does not support redirects.
+ ///
+ ERROR_WSMAN_UNSUPPORTED_HTTP_STATUS_REDIRECT = 0x80338110,
+
+ ///
+ /// The WinRM client sent a request to the remote WS-Management service and was notified that the request size exceeded the
+ /// configured MaxEnvelopeSize quota.
+ ///
+ ERROR_WSMAN_HTTP_REQUEST_TOO_LARGE_STATUS = 0x80338111,
+
+ ///
+ /// The connection to the specified remote host was refused. Verify that the WS-Management service is running on the remote host and
+ /// configured to listen for requests on the correct port and HTTP URL.
+ ///
+ ERROR_WSMAN_HTTP_SERVICE_UNAVAILABLE_STATUS = 0x80338112,
+
+ ///
+ /// The WinRM client sent a request to an HTTP server and got a response saying the requested HTTP URL was not available. This is
+ /// usually returned by a HTTP server that does not support the WS-Management protocol.
+ ///
+ ERROR_WSMAN_HTTP_NOT_FOUND_STATUS = 0x80338113,
+
+ ///
+ /// The subscribe packet had a Locale element with missing lang attribute. The lang attribute is required for the Locale element.
+ ///
+ ERROR_WSMAN_EVENTING_MISSING_LOCALE_IN_DELIVERY = 0x80338114,
+
+ ///
+ /// Cannot create a WinRM listener on HTTPS because this machine does not have an appropriate certificate. To be used for SSL, a
+ /// certificate must have a CN matching the hostname, be appropriate for Server Authentication, and not be expired, revoked, or self-signed.
+ ///
+ ERROR_WSMAN_QUICK_CONFIG_FAILED_CERT_REQUIRED = 0x80338115,
+
+ /// Firewall does not allow exceptions; WinRM cannot be setup for remote access.
+ ERROR_WSMAN_QUICK_CONFIG_FIREWALL_EXCEPTIONS_DISALLOWED = 0x80338116,
+
+ ///
+ /// The Windows Remote Management (WinRM) service cannot be configured for remote access because Group Policy does not allow local
+ /// firewall changes. Check the Group Policy settings to allow local firewall exceptions and add WinRM to the firewall exceptions.
+ ///
+ ERROR_WSMAN_QUICK_CONFIG_LOCAL_POLICY_CHANGE_DISALLOWED = 0x80338117,
+
+ ///
+ /// The WinRM client cannot process the request because the selector name is not valid. Change the selector name and retry the request.
+ ///
+ ERROR_WSMAN_INVALID_SELECTOR_NAME = 0x80338118,
+
+ /// The WS-Management service does not support the encoding type specified.
+ ERROR_WSMAN_ENCODING_TYPE = 0x80338119,
+
+ ///
+ /// The WS-Management service cannot process the request because the selector values do not match a known resource, or the resource
+ /// is offline. Retry the request later when the resource is online, or try a different selector.
+ ///
+ ERROR_WSMAN_ENDPOINT_UNAVAILABLE_INVALID_VALUE = 0x8033811A,
+
+ /// The WS-Management service cannot process the request because the a header in the request is invalid.
+ ERROR_WSMAN_INVALID_HEADER = 0x8033811B,
+
+ /// The expiration time specified for enumeration was invalid. Specify the expiration time as a duration.
+ ERROR_WSMAN_ENUMERATE_UNSUPPORTED_EXPIRATION_TYPE = 0x8033811C,
+
+ ///
+ /// The WS-Management service received a request which specified a maximum number of elements, but the service does not support this
+ /// feature. Retry the request without this element specified.
+ ///
+ ERROR_WSMAN_MAX_ELEMENTS_NOT_SUPPORTED = 0x8033811D,
+
+ /// The WS-Management service cannot process the request. The WMI provider returned an 'invalid parameter' error.
+ ERROR_WSMAN_WMI_PROVIDER_INVALID_PARAMETER = 0x8033811E,
+
+ ///
+ /// The WinRM client cannot process the request. The request must contain one and only one enumeration mode. Change the request to
+ /// contain only one enumeration mode and try again.
+ ///
+ ERROR_WSMAN_CLIENT_MULTIPLE_ENUM_MODE_FLAGS = 0x8033811F,
+
+ ///
+ /// The WinRS client cannot process the request. An invalid flag was specified for this request. Remove or change the invalid flag
+ /// and try the request again.
+ ///
+ ERROR_WINRS_CLIENT_INVALID_FLAG = 0x80338120,
+
+ ///
+ /// The WinRS client cannot process the request. One of the parameters required is null or zero. Change the request to include the
+ /// missing parameter and try again.
+ ///
+ ERROR_WINRS_CLIENT_NULL_PARAM = 0x80338121,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management CannotProcessFilter, details= The data source could not process the filter. The filter
+ /// might be missing, invalid or too complex to process. If a service only supports a subset of a filter dialect (such as XPath level
+ /// 1), it may return this fault for valid filter expressions outside of the supported subset. Change the filter and try the request again.
+ ///
+ ERROR_WSMAN_CANNOT_PROCESS_FILTER = 0x80338122,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManEnumeratorAddEvent function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_ENUMERATORADDEVENT_NULL_PARAM = 0x80338123,
+
+ ///
+ /// The WinRM client cannot process the request. The object parameter for the WSManEnumeratorAddObject function is null or zero, but
+ /// the enumeration mode is Object or ObjectAndEPR.
+ ///
+ ERROR_WSMAN_ADDOBJECT_MISSING_OBJECT = 0x80338124,
+
+ ///
+ /// The WinRM client cannot process the request. The EPR parameter for the WSManEnumeratorAddObject function is null or zero, but the
+ /// enumeration mode is EPR or ObjectAndEPR.
+ ///
+ ERROR_WSMAN_ADDOBJECT_MISSING_EPR = 0x80338125,
+
+ ///
+ /// Returned by client when get timeout from network layer WinRM cannot complete the operation. Verify that the specified computer
+ /// name is valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled
+ /// and allows access from this computer. By default, the WinRM firewall exception for public profiles limits access to remote
+ /// computers within the same local subnet.
+ ///
+ ERROR_WSMAN_NETWORK_TIMEDOUT = 0x80338126,
+
+ /// Not used. To be removed.
+ ERROR_WINRS_RECEIVE_IN_PROGRESS = 0x80338127,
+
+ /// The WinRS client cannot process the Receive request because the shell plugin returned an empty response to the request.
+ ERROR_WINRS_RECEIVE_NO_RESPONSE_DATA = 0x80338128,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WSManCreateShell function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WINRS_CLIENT_CREATESHELL_NULL_PARAM = 0x80338129,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WinrsCloseShell function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WINRS_CLIENT_CLOSESHELL_NULL_PARAM = 0x8033812A,
+
+ ///
+ /// The WinRS client cannot process the request. The parameter required for the WinrsFreeCreateShellResult function is null or zero.
+ /// Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WINRS_CLIENT_FREECREATESHELLRESULT_NULL_PARAM = 0x8033812B,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WSManRunShellCommand function is null
+ /// or zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WINRS_CLIENT_RUNCOMMAND_NULL_PARAM = 0x8033812C,
+
+ ///
+ /// The WinRS client cannot process the request. The parameter required for the WinrsFreeRunCommandResult function is null or zero.
+ /// Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WINRS_CLIENT_FREERUNCOMMANDRESULT_NULL_PARAM = 0x8033812D,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WSManSignalShell function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WINRS_CLIENT_SIGNAL_NULL_PARAM = 0x8033812E,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WSMansReceiveShellOutput function is
+ /// null or zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WINRS_CLIENT_RECEIVE_NULL_PARAM = 0x8033812F,
+
+ ///
+ /// The WinRS client cannot process the request. The parameter required for the WinrsFreePullResult function is null or zero. Change
+ /// the request to include the missing parameter and try again.
+ ///
+ ERROR_WINRS_CLIENT_FREEPULLRESULT_NULL_PARAM = 0x80338130,
+
+ ///
+ /// The WinRS client cannot process the request. One of the parameters required for the WinrsPull function is null or zero. Change
+ /// the request to include the missing parameter and try again.
+ ///
+ ERROR_WINRS_CLIENT_PULL_NULL_PARAM = 0x80338131,
+
+ ///
+ /// The WinRS client cannot process the request. The parameter required for the WinrsCloseReceiveHandle function is null or zero.
+ /// Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WINRS_CLIENT_CLOSERECEIVEHANDLE_NULL_PARAM = 0x80338132,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WSManSendShellInput function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WINRS_CLIENT_SEND_NULL_PARAM = 0x80338133,
+
+ ///
+ /// The WinRS client cannot process the request. One of the parameters required for the WinrsPush function is null or zero. Change
+ /// the request to include the missing parameter and try again.
+ ///
+ ERROR_WINRS_CLIENT_PUSH_NULL_PARAM = 0x80338134,
+
+ ///
+ /// The WinRS client cannot process the request. The parameter required for the WinrsCloseSendHandle function is null or zero. Change
+ /// the request to include the missing parameter and try again.
+ ///
+ ERROR_WINRS_CLIENT_CLOSESENDHANDLE_NULL_PARAM = 0x80338135,
+
+ ///
+ /// The WinRS client cannot process the request. One of the parameters required for the WinrsGet function is null or zero. Change the
+ /// request to include the missing parameter and try again.
+ ///
+ ERROR_WINRS_CLIENT_GET_NULL_PARAM = 0x80338136,
+
+ ///
+ /// The WS-Management service does not support the specified polymorphism mode. Try changing the polymorphism mode specified, and try again.
+ ///
+ ERROR_WSMAN_POLYMORPHISM_MODE_UNSUPPORTED = 0x80338137,
+
+ ///
+ /// The WS-Management service cannot process the request because the specified URI is not supported on the service side. Retry the
+ /// request with local session.
+ ///
+ ERROR_WSMAN_REQUEST_NOT_SUPPORTED_AT_SERVICE = 0x80338138,
+
+ ///
+ /// The WS-Management service cannot process the request. A DMTF resource URI was used to access a non-DMTF class. Try again using a
+ /// non-DMTF resource URI.
+ ///
+ ERROR_WSMAN_URI_NON_DMTF_CLASS = 0x80338139,
+
+ ///
+ /// The WS-Management service cannot process the request. The DMTF class in the repository uses a different major version number from
+ /// the requested class. This class can be accessed using a non-DMTF resource URI.
+ ///
+ ERROR_WSMAN_URI_WRONG_DMTF_VERSION = 0x8033813A,
+
+ ///
+ /// The WS-Management service cannot process the request. The resource URI and __cimnamespace selector attempted to use different
+ /// namespaces. Try removing the __cimnamespace selector or using a DMTF resource URI. If a non-DMTF resource URI is used with a
+ /// __cimnamespace selector, the namespaces must match.
+ ///
+ ERROR_WSMAN_DIFFERENT_CIM_SELECTOR = 0x8033813B,
+
+ ///
+ /// The WS-Management client cannot process the request. To use the WSManSubscribe API the user has to be running under Network
+ /// Service account. No other account is supported currently for push subscriptions.
+ ///
+ ERROR_WSMAN_PUSHSUBSCRIPTION_INVALIDUSERACCOUNT = 0x8033813C,
+
+ ///
+ /// The WS-Management client cannot process the request. The event source machine is not joined to a domain. To set up a push
+ /// subscription session to an event source the source has to be connected to a domain. To fix this problem either join the event
+ /// source machine to a domain or use PULL as the delivery mode for the subscription.
+ ///
+ ERROR_WSMAN_EVENTING_NONDOMAINJOINED_PUBLISHER = 0x8033813D,
+
+ ///
+ /// The WS-Management client cannot process the request. The subscriber machine is not joined to a domain. To set up a push
+ /// subscription session to an event source, the subscriber machine has to be connected to a domain. To fix this problem either join
+ /// the subscriber machine to a domain or use PULL as the delivery mode for the subscription.
+ ///
+ ERROR_WSMAN_EVENTING_NONDOMAINJOINED_COLLECTOR = 0x8033813E,
+
+ ///
+ /// The WinRM client cannot process the request because it is trying to update a read-only setting. Remove this setting from the
+ /// command and try again.
+ ///
+ ERROR_WSMAN_CONFIG_READONLY_PROPERTY = 0x8033813F,
+
+ ///
+ /// The WinRS client cannot process the request. The server cannot set Code Page. You may want to use the CHCP command to change the
+ /// client Code Page to 437 and receive the results in English.
+ ///
+ ERROR_WINRS_CODE_PAGE_NOT_SUPPORTED = 0x80338140,
+
+ /// Not used. To be removed.
+ ERROR_WSMAN_CLIENT_DISABLE_LOOPBACK_WITH_EXPLICIT_CREDENTIALS = 0x80338141,
+
+ /// Not used. To be removed.
+ ERROR_WSMAN_CLIENT_INVALID_DISABLE_LOOPBACK = 0x80338142,
+
+ ///
+ /// The WS-Management client received too many results from the server. The server implementation should never return more items than
+ /// are specified by the client.
+ ///
+ ERROR_WSMAN_CLIENT_ENUM_RECEIVED_TOO_MANY_ITEMS = 0x80338143,
+
+ ///
+ /// The WinRM client cannot process the request. A certificate thumbprint was specified together with a user name or password. Only
+ /// one credentials type can be specified. Remove the credentials type that does not correspond to the intended authentication
+ /// mechanism and retry the request.
+ ///
+ ERROR_WSMAN_MULTIPLE_CREDENTIALS = 0x80338144,
+
+ ///
+ /// The WinRM client cannot process the request. The flag that specifies the authentication mechanism to use is incorrect. Remove or
+ /// change the invalid flag and try the request again.
+ ///
+ ERROR_WSMAN_AUTHENTICATION_INVALID_FLAG = 0x80338145,
+
+ ///
+ /// The WinRM client cannot process the request. When an authentication mechanism is not specified, only user name and password
+ /// credentials are allowed. If you want to use a different type of credentials then you need to specify the authentication
+ /// mechanism. Specify the authentication mechanism or the correct credentials and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_CREDENTIALS_FOR_DEFAULT_AUTHENTICATION = 0x80338146,
+
+ ///
+ /// The WinRM client cannot process the request. For authentication mechanisms that require the credentials of an user account, both
+ /// user name and password must be specified. Specify the missing user name or password and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_USERNAME_AND_PASSWORD_NEEDED = 0x80338147,
+
+ ///
+ /// The WinRM client cannot process the request. If you are using a machine certificate, it must contain a DNS name in the Subject
+ /// Alternative Name extension or in the Subject Name field, and no UPN name. If you are using a user certificate, the Subject
+ /// Alternative Name extension must contain a UPN name and must not contain a DNS name. Change the certificate structure and try the
+ /// request again.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_CERT_DNS_OR_UPN = 0x80338148,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the environment variable name passed to the WSManCreateShell function
+ /// is null or zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CREATESHELL_NULL_ENVIRONMENT_VARIABLE_NAME = 0x80338149,
+
+ ///
+ /// An operation is being attempted on a shell that is being closed. This can happen if the shell that is being used is also being
+ /// closed by another thread.
+ ///
+ ERROR_WSMAN_SHELL_ALREADY_CLOSED = 0x8033814A,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the stream id name passed to the WSManCreateShell function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CREATESHELL_NULL_STREAMID = 0x8033814B,
+
+ ///
+ /// The WinRM Shell client cannot process the request. The shell handle passed to the WSMan Shell function is not valid. The shell
+ /// handle is valid only when WSManCreateShell function completes successfully. Change the request including a valid shell handle and
+ /// try again.
+ ///
+ ERROR_WSMAN_SHELL_INVALID_SHELL_HANDLE = 0x8033814C,
+
+ ///
+ /// The WinRM Shell client cannot process the request. The command handle passed to the WSMan Shell function is not valid. The
+ /// command handle is valid only when WSManRunShellCommand function completes successfully. Change the request including a valid
+ /// shell handle and try again.
+ ///
+ ERROR_WSMAN_SHELL_INVALID_COMMAND_HANDLE = 0x8033814D,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the argument value passed to the WSManRunShellCommand function is null
+ /// or zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_RUNSHELLCOMMAND_NULL_ARGUMENT = 0x8033814E,
+
+ ///
+ /// An operation is being attempted on a command that is being closed. This can happen if the command handle that is being used is
+ /// also being freed by another thread.
+ ///
+ ERROR_WSMAN_COMMAND_ALREADY_CLOSED = 0x8033814F,
+
+ ///
+ /// The WinRM Shell client cannot process the request. The stream id index from within WSMAN_STREAM_ELEMENT passed to the
+ /// WSManSendShellInput function is invalid. The stream id index should be an index from within inputStreamSet array passed to the
+ /// WSManCreateShell function. Change the request with a valid index and try again.
+ ///
+ ERROR_WSMAN_SENDSHELLINPUT_INVALID_STREAMID_INDEX = 0x80338150,
+
+ /// Not used. To be removed.
+ ERROR_WSMAN_SHELL_SYNCHRONOUS_NOT_SUPPORTED = 0x80338151,
+
+ ///
+ /// The WS-Management operations to update the certificate mapping store of the WINRM service config can only be done remotely.
+ ///
+ ERROR_WSMAN_NO_CERTMAPPING_OPERATION_FOR_LOCAL_SESSION = 0x80338152,
+
+ ///
+ /// The WINRM certificate mapping configuration store has reached an internal limit and cannot create any more entries. Remove some
+ /// entries and try again.
+ ///
+ ERROR_WSMAN_CERTMAPPING_CONFIGLIMIT_EXCEEDED = 0x80338153,
+
+ ///
+ /// The WINRM certificate mapping configuration operation cannot be completed because the user credentials could not be verified.
+ /// Please check the username and password used for mapping this certificate and verify that it is a non-domain account and try again.
+ ///
+ ERROR_WSMAN_CERTMAPPING_INVALIDUSERCREDENTIALS = 0x80338154,
+
+ ///
+ /// The WinRM client cannot process the request. The Enhanced Key Usage (EKU) field of the certificate is not set to "Client
+ /// Authentication". Retry the request with a certificate that has the correct EKU.
+ ///
+ ERROR_WSMAN_CERT_INVALID_USAGE_CLIENT = 0x80338155,
+
+ ///
+ /// The WinRM client cannot process the request. A certificate thumbprint was specified, but the following flag is missing:
+ /// WSManFlagUseClientCertificate. Add the flag and try the request again.
+ ///
+ ERROR_WSMAN_CERT_MISSING_AUTH_FLAG = 0x80338156,
+
+ ///
+ /// The WinRM client cannot process the request. The following flags cannot be specified together: WSManFlagUseClientCertificate and
+ /// WSManFlagCredUsernamePassword. Remove one of the flags and try the request again.
+ ///
+ ERROR_WSMAN_CERT_MULTIPLE_CREDENTIALS_FLAG = 0x80338157,
+
+ ///
+ /// The WinRM client cannot process the request because the CustomRemoteShell URI specified is invalid. CustomRemoteShell URI should
+ /// start with WinRM shell resource URI prefix: "http://schemas.microsoft.com/wbem/wsman/1/windows/shell". The URI should not contain
+ /// invalid characters including '*', '?', white spaces and tabs. The CustomRemoteShell URI cannot be longer than 1023 characters.
+ ///
+ ERROR_WSMAN_CONFIG_SHELL_URI_INVALID = 0x80338158,
+
+ ///
+ /// The WinRM client cannot process the request because the CustomRemoteShell URI specified is invalid. Windows command shell URI
+ /// ("http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd") cannot be a CustomRemoteShell URI.
+ ///
+ ERROR_WSMAN_CONFIG_SHELL_URI_CMDSHELLURI_NOTPERMITTED = 0x80338159,
+
+ ///
+ /// The WinRM client cannot process the request because the process path specified for the CustomRemoteShell table entry is invalid.
+ /// The process path should be absolute and should point to an existing executable.
+ ///
+ ERROR_WSMAN_CONFIG_SHELLURI_INVALID_PROCESSPATH = 0x8033815A,
+
+ /// Not used. To be removed.
+ ERROR_WINRS_SHELL_URI_INVALID = 0x8033815B,
+
+ /// The WinRM client cannot process the request because the provided security descriptor is invalid.
+ ERROR_WSMAN_INVALID_SECURITY_DESCRIPTOR = 0x8033815C,
+
+ ///
+ /// The WinRM service cannot process the request because the WS-Policy contained in the DeliverTo is too complex or uses a structure
+ /// not understood by the service. The WinRM service supports a single layer of policy assertions underneath a wsp:ExactlyOne element.
+ ///
+ ERROR_WSMAN_POLICY_TOO_COMPLEX = 0x8033815D,
+
+ ///
+ /// The WinRM service cannot process the request because the WS-Policy contained in the DeliverTo does not contain any options that
+ /// the service can comply with. The WinRM service supports the following profiles: Negotiate or Kerberos over HTTP, Negotiate or
+ /// Kerberos over HTTPS, and mutual certificate authentication over HTTPS using issuer thumbprints.
+ ///
+ ERROR_WSMAN_POLICY_CANNOT_COMPLY = 0x8033815E,
+
+ /// The WinRM service cannot process the request because the wsman:ConnectionRetry element in the DeliverTo is invalid.
+ ERROR_WSMAN_INVALID_CONNECTIONRETRY = 0x8033815F,
+
+ ///
+ /// WinRM cannot make the configuration change. The URI supplied for the certificate mapping operation is not valid. It must contain
+ /// at least one character. It must not contain internal whitespace. It must not contain '?' character. A prefix may be specified by
+ /// using "*" as the last character. The URI cannot be longer than 1023 characters.
+ ///
+ ERROR_WSMAN_URISECURITY_INVALIDURIKEY = 0x80338160,
+
+ ///
+ /// WinRM cannot make the configuration change. The Subject used for the certificate mapping operation is not valid. It must contain
+ /// at least one character. It must contain at most one "*" character which should be the first character. (This may be the only
+ /// character in which case it matches all subjects). The Subject cannot be longer than 1023 characters.
+ ///
+ ERROR_WSMAN_CERTMAPPING_INVALIDSUBJECTKEY = 0x80338161,
+
+ ///
+ /// WinRM cannot make the configuration change because the Issuer used for the certificate mapping operation is not valid. The
+ /// certificate identified by the issuer thumbprint must be present in the machine "Trusted Root Certification Authorities" or
+ /// "Intermediate Certification Authorities" store. The certificate must have key usage that allows it to sign other certificates.
+ ///
+ ERROR_WSMAN_CERTMAPPING_INVALIDISSUERKEY = 0x80338162,
+
+ ///
+ /// The WinRM client cannot process the request because the type field in the WSMAN_ALLOWED_PUBLISHERS argument is invalid.
+ /// Collector-initiated subscriptions must use WSMAN_SINGLE_PUBLISHER and Source-initiated subscriptions must use WSMAN_MULTIPLE_PUBLISHERS.
+ ///
+ ERROR_WSMAN_INVALID_PUBLISHERS_TYPE = 0x80338163,
+
+ ///
+ /// The WinRM client cannot process the request because the delivery retry parameters are invalid. If delivery retry is requested,
+ /// the deliveryRetryInterval and deliveryRetryAttempts fields must both be nonzero.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_DELIVERY_RETRY = 0x80338164,
+
+ ///
+ /// The WinRM client cannot process the request. The required WSMAN_ALLOWED_PUBLISHERS settings is null or zero. Change the request
+ /// to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_NULL_PUBLISHERS = 0x80338165,
+
+ ///
+ /// The WinRM client cannot process the request because client certificate subject filters were specified without any issuers. When
+ /// using client certificate authentication, specify at least one issuer thumbprint.
+ ///
+ ERROR_WSMAN_CLIENT_NULL_ISSUERS = 0x80338166,
+
+ ///
+ /// The WinRM client cannot process the request because the subscription contains no domain or non-domain sources. Subscriptions
+ /// using WSMAN_MULTIPLE_PUBLISHERS must specify either a security descriptor or an issuer list or both.
+ ///
+ ERROR_WSMAN_CLIENT_NO_SOURCES = 0x80338167,
+
+ ///
+ /// The WinRM service cannot process the request because the subscription manager returned invalid enumeration results. The
+ /// m:Subscription XML object or m:Version element is missing or invalid.
+ ///
+ ERROR_WSMAN_INVALID_SUBSCRIBE_OBJECT = 0x80338168,
+
+ ///
+ /// WinRM firewall exception will not work since one of the network connection types on this machine is set to Public. Change the
+ /// network connection type to either Domain or Private and try again.
+ ///
+ ERROR_WSMAN_PUBLIC_FIREWALL_PROFILE_ACTIVE = 0x80338169,
+
+ ///
+ /// WinRM cannot make the configuration change. The Password used for updating the certificate mapping configuration is not valid. It
+ /// cannot be longer than 255 characters.
+ ///
+ ERROR_WSMAN_CERTMAPPING_PASSWORDTOOLONG = 0x8033816A,
+
+ ///
+ /// WinRM cannot make the configuration change. The Password used for updating the certificate mapping configuration is not valid. A
+ /// user account used for configuring a certificate mapping cannot have a blank password.
+ ///
+ ERROR_WSMAN_CERTMAPPING_PASSWORDBLANK = 0x8033816B,
+
+ ///
+ /// WinRM cannot make the configuration change. The credential used for updating or creating the certificate mapping configuration is
+ /// not valid. The credential consists of both Password and UserName being supplied together in a pair.
+ ///
+ ERROR_WSMAN_CERTMAPPING_PASSWORDUSERTUPLE = 0x8033816C,
+
+ ///
+ /// The WinRM service executed an operation and the provider returned inconclusive information regarding success or failure of the
+ /// operation. The status was marked as failed, but no error code was given.
+ ///
+ ERROR_WSMAN_INVALID_PROVIDER_RESPONSE = 0x8033816D,
+
+ ///
+ /// The WS-Management service on the remote machine cannot process the shell request. This can happen if the WS-Management service on
+ /// the remote machine was being shutdown. To correct this problem restart the WS-Management service on the remote machine and
+ /// re-send the shell request.
+ ///
+ ERROR_WSMAN_SHELL_NOT_INITIALIZED = 0x8033816E,
+
+ ///
+ /// The WinRM service cannot process the request. The URI parameter is the key to CustomRemoteShell table and cannot be modified.
+ ///
+ ERROR_WSMAN_CONFIG_SHELLURI_INVALID_OPERATION_ON_KEY = 0x8033816F,
+
+ ///
+ /// The WinRM client received an HTTP server error status (500), but the remote service did not include any other information about
+ /// the cause of the failure.
+ ///
+ ERROR_WSMAN_HTTP_STATUS_SERVER_ERROR = 0x80338170,
+
+ ///
+ /// The WinRM client received an HTTP bad request status (400), but the remote service did not include any other information about
+ /// the cause of the failure.
+ ///
+ ERROR_WSMAN_HTTP_STATUS_BAD_REQUEST = 0x80338171,
+
+ ///
+ /// The WinRM service cannot make the configuration change. The selector keys of Subject, URI or Issuer cannot be changed by
+ /// overriding the selector key value in the body.
+ ///
+ ERROR_WSMAN_CONFIG_CANNOT_CHANGE_CERTMAPPING_KEYS = 0x80338172,
+
+ /// The WinRM client cannot process the request because it received an HTML error packet.
+ ERROR_WSMAN_HTML_ERROR = 0x80338173,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManInitialize function is null or zero.
+ /// Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_INITIALIZE_NULL_PARAM = 0x80338174,
+
+ ///
+ /// The WinRM client cannot process the request. An invalid flag was specified for the WSManInitialize API call. Remove or change the
+ /// invalid flag and try the call again.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_INIT_APPLICATION_FLAG = 0x80338175,
+
+ ///
+ /// The WinRM client cannot process the request. An invalid flag was specified for the WSManDeinitialize API call. Remove or change
+ /// the invalid flag and try the call again.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_DEINIT_APPLICATION_FLAG = 0x80338176,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManSetSessionOption function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_SETSESSIONOPTION_NULL_PARAM = 0x80338177,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManSetSessionOption function is invalid.
+ /// Change the invalid parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_SETSESSIONOPTION_INVALID_PARAM = 0x80338178,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required to get a session option is invalid. Change the
+ /// invalid parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_GETSESSIONOPTION_INVALID_PARAM = 0x80338179,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WSManCreateShell function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_CREATESHELL_NULL_PARAM = 0x8033817A,
+
+ ///
+ /// The WinRM client cannot process the request. An invalid flag was specified for the WSManCreateShell API call. Remove or change
+ /// the invalid flag and try the call again.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_CREATE_SHELL_FLAG = 0x8033817B,
+
+ ///
+ /// The WinRM client cannot process the request. An invalid flag was specified for the WSManCloseShell API call. Remove or change the
+ /// invalid flag and try the call again.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_CLOSE_SHELL_FLAG = 0x8033817C,
+
+ ///
+ /// The WinRM client cannot process the request. An invalid flag was specified for the WSManCloseCommand API call. Remove or change
+ /// the invalid flag and try the call again.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_CLOSE_COMMAND_FLAG = 0x8033817D,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WSManCloseShell function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_CLOSESHELL_NULL_PARAM = 0x8033817E,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WSManCloseCommand function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_CLOSECOMMAND_NULL_PARAM = 0x8033817F,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WSManRunShellCommand function is null
+ /// or zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_RUNCOMMAND_NULL_PARAM = 0x80338180,
+
+ ///
+ /// The WinRM client cannot process the request. An invalid flag was specified for the WSManRunShellCommand API call. Remove or
+ /// change the invalid flag and try the call again.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_RUNCOMMAND_FLAG = 0x80338181,
+
+ ///
+ /// The WinRM client cannot process the request. You must wait for the WSManRunShellCommand API call to complete before calling
+ /// WSManCloseShellOperationEx API.
+ ///
+ ERROR_WSMAN_CLIENT_RUNCOMMAND_NOTCOMPLETED = 0x80338182,
+
+ ///
+ /// The WinRM client cannot process the request. The response to a Command request did not contain a valid CommandResponse element.
+ /// The CommandResponse element was not found or did not contain valid content.
+ ///
+ ERROR_WSMAN_NO_COMMAND_RESPONSE = 0x80338183,
+
+ ///
+ /// The WinRM client cannot process the request. The OptionSet element is invalid. Change the request to include a valid OptionSet
+ /// element and try again.
+ ///
+ ERROR_WSMAN_INVALID_OPTIONSET = 0x80338184,
+
+ ///
+ /// The WinRM client cannot process the request. The response to a Command request did not contain a valid CommandResponse element.
+ /// The CommandId element was not found or did not contain valid content.
+ ///
+ ERROR_WSMAN_NO_COMMANDID = 0x80338185,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WSManSignalShell function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_SIGNAL_NULL_PARAM = 0x80338186,
+
+ ///
+ /// The WinRM client cannot process the request. An invalid flag was specified for the WSManSignalShell API call. Remove or change
+ /// the invalid flag and try the call again.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_SIGNAL_SHELL_FLAG = 0x80338187,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WSManSendShellInput function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_SEND_NULL_PARAM = 0x80338188,
+
+ ///
+ /// The WinRM client cannot process the request. An invalid flag was specified for the WSManSendShellInput API call. Remove or change
+ /// the invalid flag and try the call again.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_SEND_SHELL_FLAG = 0x80338189,
+
+ ///
+ /// The WinRM client cannot process the request. An invalid parameter was specified for the WSManSendShellInput API call. streamData
+ /// parameter should be specified in binary format using WSMAN_DATA_TYPE_BINARY type. Change the invalid parameter and try the call again.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_SEND_SHELL_PARAMETER = 0x8033818A,
+
+ ///
+ /// The WinRM Shell client cannot process the request. The stream name passed to the WSManSendShellInput function is not valid. The
+ /// input stream name should be specified as part of the input streams during shell creation using WSManCreateShell function. Change
+ /// the request including a valid input stream name and try again.
+ ///
+ ERROR_WSMAN_SHELL_INVALID_INPUT_STREAM = 0x8033818B,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WSManReceiveShellOutput function is
+ /// null or zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_RECEIVE_NULL_PARAM = 0x8033818C,
+
+ ///
+ /// The WinRM Shell client cannot process the request. The stream or list of streams passed to the WSManReceiveShellOutput function
+ /// is not valid. The desired stream names should be specified as part of the output streams during shell creation using
+ /// WSManCreateShell function. Change the request including valid desired streams and try again.
+ ///
+ ERROR_WSMAN_SHELL_INVALID_DESIRED_STREAMS = 0x8033818D,
+
+ ///
+ /// The WinRM client cannot process the request. An invalid flag was specified for the WSManReceiveShellOutput API call. Remove or
+ /// change the invalid flag and try the call again.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_RECEIVE_SHELL_FLAG = 0x8033818E,
+
+ ///
+ /// The WinRM client cannot process the request. The response to a Receive request did not contain a valid ReceiveResponse element.
+ /// The ReceiveResponse element was not found or did not contain valid content.
+ ///
+ ERROR_WSMAN_NO_RECEIVE_RESPONSE = 0x8033818F,
+
+ /// The WSMan plugin configuration is corrupted.
+ ERROR_WSMAN_PLUGIN_CONFIGURATION_CORRUPTED = 0x80338190,
+
+ /// The file path specified is either not absolute, not in the system32 directory, or not valid.
+ ERROR_WSMAN_INVALID_FILEPATH = 0x80338191,
+
+ /// The file specified does not exist.
+ ERROR_WSMAN_FILE_NOT_PRESENT = 0x80338192,
+
+ /// The WSMan extension failed to read IIS configuration.
+ ERROR_WSMAN_IISCONFIGURATION_READ_FAILED = 0x80338193,
+
+ /// The WinRM client cannot process the request. The locale option is invalid. Change the locale and try again.
+ ERROR_WSMAN_CLIENT_INVALID_LOCALE = 0x80338194,
+
+ /// The WinRM client cannot process the request. The UI language option is invalid. Change the UI language and try again.
+ ERROR_WSMAN_CLIENT_INVALID_UI_LANGUAGE = 0x80338195,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManGetErrorMessage function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_GETERRORMESSAGE_NULL_PARAM = 0x80338196,
+
+ ///
+ /// The WinRM client cannot process the request. The language code parameter is invalid. The language code parameter should be either
+ /// NULL or a valid RFC 3066 language code. Change the language code and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_LANGUAGE_CODE = 0x80338197,
+
+ ///
+ /// The WinRM client cannot process the request. An invalid flag was specified for the WSManGetErrorMessage API call. Remove or
+ /// change the invalid flag and try the call again.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_GETERRORMESSAGE_FLAG = 0x80338198,
+
+ ///
+ /// The WinRM service cannot process the request because the request needs to be sent to a different machine. Use the redirect
+ /// information to send the request to a new machine.
+ ///
+ ERROR_WSMAN_REDIRECT_REQUESTED = 0x80338199,
+
+ ///
+ /// The WinRM client cannot process the request. The flag that specifies the proxy authentication mechanism to use is incorrect.
+ /// Remove or change the invalid flag and try the request again.
+ ///
+ ERROR_WSMAN_PROXY_AUTHENTICATION_INVALID_FLAG = 0x8033819A,
+
+ ///
+ /// The WinRM client cannot process the request. The credentials for proxy authentication are not specified correctly. Both user name
+ /// and password credentials must be valid. Specify the correct credentials and try the request again.
+ ///
+ ERROR_WSMAN_CLIENT_CREDENTIALS_FOR_PROXY_AUTHENTICATION = 0x8033819B,
+
+ ///
+ /// The WinRM client cannot process the request. The proxy access type is incorrect. Use one of the proxy access type flags; the
+ /// flags cannot be combined. Change the invalid proxy access type and try the request again.
+ ///
+ ERROR_WSMAN_PROXY_ACCESS_TYPE = 0x8033819C,
+
+ ///
+ /// The WinRM client cannot process the request. The direct connection to the server option cannot be used with non empty proxy
+ /// authentication data. Change the invalid proxy access type or use empty proxy authentication data and try the request again.
+ ///
+ ERROR_WSMAN_INVALID_OPTION_NO_PROXY_SERVER = 0x8033819D,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManGetSessionOptionAsDword function is null
+ /// or zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_GETSESSIONOPTION_DWORD_NULL_PARAM = 0x8033819E,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManGetSessionOptionAsDword function is
+ /// invalid. Change the invalid parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_GETSESSIONOPTION_DWORD_INVALID_PARAM = 0x8033819F,
+
+ ///
+ /// The WinRM client cannot process the request. One of the parameters required for the WSManGetSessionOptionAsString function is
+ /// invalid. Change the invalid parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_GETSESSIONOPTION_STRING_INVALID_PARAM = 0x803381A0,
+
+ ///
+ /// The WinRM client cannot process the request. Requests must include user name and password when CredSSP authentication mechanism
+ /// is used. Add the user name and password or change the authentication mechanism and try the request again.
+ ///
+ ERROR_WSMAN_CREDSSP_USERNAME_PASSWORD_NEEDED = 0x803381A1,
+
+ ///
+ /// The WinRM client cannot process the request. CredSSP authentication is currently disabled in the client configuration. Change the
+ /// client configuration and try the request again. CredSSP authentication must also be enabled in the server configuration. Also,
+ /// Group Policy must be edited to allow credential delegation to the target computer. Use gpedit.msc and look at the following
+ /// policy: Computer Configuration -> Administrative Templates -> System -> Credentials Delegation -> Allow Delegating
+ /// Fresh Credentials. Verify that it is enabled and configured with an SPN appropriate for the target computer. For example, for a
+ /// target computer name "myserver.domain.com", the SPN can be one of the following: WSMAN/myserver.domain.com or WSMAN/*.domain.com
+ ///
+ ERROR_WSMAN_CLIENT_CREDSSP_AUTHENTICATION_DISABLED = 0x803381A2,
+
+ ///
+ /// The WinRM client cannot process the request. A computer policy does not allow the delegation of the user credentials to the
+ /// target computer. Use gpedit.msc and look at the following policy: Computer Configuration -> Administrative Templates ->
+ /// System -> Credentials Delegation -> Allow Delegating Fresh Credentials. Verify that it is enabled and configured with an
+ /// SPN appropriate for the target computer. For example, for a target computer name "myserver.domain.com", the SPN can be one of the
+ /// following: WSMAN/myserver.domain.com or WSMAN/*.domain.com.
+ ///
+ ERROR_WSMAN_CLIENT_ALLOWFRESHCREDENTIALS = 0x803381A3,
+
+ ///
+ /// The WinRM client cannot process the request. A computer policy does not allow the delegation of the user credentials to the
+ /// target computer because the computer is not trusted. The identity of the target computer can be verified if you configure the
+ /// WSMAN service to use a valid certificate using the following command: winrm set winrm/config/service
+ /// @{CertificateThumbprint="<thumbprint>"} Or you can check the Event Viewer for an event that specifies that the following
+ /// SPN could not be created: WSMAN/<computerFQDN>. If you find this event, you can manually create the SPN using setspn.exe .
+ /// If the SPN exists, but CredSSP cannot use Kerberos to validate the identity of the target computer and you still want to allow
+ /// the delegation of the user credentials to the target computer, use gpedit.msc and look at the following policy: Computer
+ /// Configuration -> Administrative Templates -> System -> Credentials Delegation -> Allow Fresh Credentials with
+ /// NTLM-only Server Authentication. Verify that it is enabled and configured with an SPN appropriate for the target computer. For
+ /// example, for a target computer name "myserver.domain.com", the SPN can be one of the following: WSMAN/myserver.domain.com or
+ /// WSMAN/*.domain.com. Try the request again after these changes.
+ ///
+ ERROR_WSMAN_CLIENT_ALLOWFRESHCREDENTIALS_NTLMONLY = 0x803381A4,
+
+ ///
+ /// The WS-Management service cannot process the request. The maximum number of concurrent shells for this user has been exceeded.
+ /// Close existing shells or raise the quota for this user.
+ ///
+ ERROR_WSMAN_QUOTA_MAX_SHELLS = 0x803381A5,
+
+ ///
+ /// The WS-Management service cannot process the request. The maximum number of concurrent operations for this user has been
+ /// exceeded. Close existing operations for this user, or raise the quota for this user.
+ ///
+ ERROR_WSMAN_QUOTA_MAX_OPERATIONS = 0x803381A6,
+
+ ///
+ /// The WS-Management service cannot process the request. The load quota for this user has been exceeded. Send future requests at a
+ /// slower rate or raise the quota for this user.
+ ///
+ ERROR_WSMAN_QUOTA_USER = 0x803381A7,
+
+ ///
+ /// The WS-Management service cannot process the request. The load quota for the system has been exceeded. Send future requests at a
+ /// slower rate or raise the system quota.
+ ///
+ ERROR_WSMAN_QUOTA_SYSTEM = 0x803381A8,
+
+ ///
+ /// The WS-Management service cannot complete the authorization under the given token. A previous authorization attempt for the same
+ /// user resulted in a different token. The user record will be revoked and the next request will reauthorize.
+ ///
+ ERROR_WSMAN_DIFFERENT_AUTHZ_TOKEN = 0x803381A9,
+
+ ///
+ /// An application tried to retrieve the HTTP Redirect location from the session when no redirect error
+ /// (ERROR_WSMAN_REDIRECT_REQUESTED) was returned. The application needs to be updated so as to only retrieve the location after this
+ /// error is returned.
+ ///
+ ERROR_WSMAN_REDIRECT_LOCATION_NOT_AVAILABLE = 0x803381AA,
+
+ ///
+ /// The WS-Management service cannot process the request. The maximum number of users executing shell operations has been exceeded.
+ /// Retry after some time or raise the quota for concurrent shell users.
+ ///
+ ERROR_WSMAN_QUOTA_MAX_SHELLUSERS = 0x803381AB,
+
+ /// The WS-Management service cannot process the request. The service is configured to not accept any remote shell requests.
+ ERROR_WSMAN_REMOTESHELLS_NOT_ALLOWED = 0x803381AC,
+
+ ///
+ /// The WS-Management service cannot complete the Pull operation for the enumeration because the wsman:MaxEnvelopeSize,
+ /// wsen:MaxCharacters or wsen:MaxElements parameters differ from those specified to the enumeration. The application needs to
+ /// specify the same parameters for Pull as were specified for the enumeration.
+ ///
+ ERROR_WSMAN_PULL_PARAMS_NOT_SAME_AS_ENUM = 0x803381AD,
+
+ ///
+ /// The WinRM service cannot process the request because it is trying to update a deprecated setting. Remove this setting from the
+ /// command and try again.
+ ///
+ ERROR_WSMAN_DEPRECATED_CONFIG_SETTING = 0x803381AE,
+
+ ///
+ /// The WS-Management service cannot process the configuration settings. A Security element contains a URI that does not match its
+ /// parent Resource element.
+ ///
+ ERROR_WSMAN_URI_SECURITY_URI = 0x803381AF,
+
+ ///
+ /// The WinRM client cannot process the request. Allow implicit credentials for Negotiate authentication option is only valid for
+ /// HTTPS transport. Remove the allow implicit credentials for Negotiate authentication option and try the request again.
+ ///
+ ERROR_WSMAN_CANNOT_USE_ALLOW_NEGOTIATE_IMPLICIT_CREDENTIALS_FOR_HTTP = 0x803381B0,
+
+ ///
+ /// The WinRM client cannot process the request. Setting proxy information is not valid when the HTTP transport is specified. Remove
+ /// the proxy information or change the transport and try the request again.
+ ///
+ ERROR_WSMAN_CANNOT_USE_PROXY_SETTINGS_FOR_HTTP = 0x803381B1,
+
+ ///
+ /// The WinRM client cannot process the request. Setting proxy information is not valid when the authentication mechanism with the
+ /// remote machine is Kerberos. Remove the proxy information or change the authentication mechanism and try the request again.
+ ///
+ ERROR_WSMAN_CANNOT_USE_PROXY_SETTINGS_FOR_KERBEROS = 0x803381B2,
+
+ ///
+ /// The WinRM client cannot process the request. Setting proxy information is not valid when the authentication mechanism with the
+ /// remote machine is CredSSP. Remove the proxy information or change the authentication mechanism and try the request again.
+ ///
+ ERROR_WSMAN_CANNOT_USE_PROXY_SETTINGS_FOR_CREDSSP = 0x803381B3,
+
+ ///
+ /// The WinRM client cannot process the request. The request must specify only one authentication mechanism for proxy. Change the
+ /// request to specify only one authentication mechanism and try again.
+ ///
+ ERROR_WSMAN_CLIENT_MULTIPLE_PROXY_AUTH_FLAGS = 0x803381B4,
+
+ ///
+ /// The WinRM client received a redirect error from the server when it is not appropriate. The only time a redirect error can be
+ /// reported correctly is during the authorization of a user. This would result in a properly formatted redirect response from the
+ /// server that includes the redirect endpoint.
+ ///
+ ERROR_WSMAN_INVALID_REDIRECT_ERROR = 0x803381B5,
+
+ /// The WinRM service received a redirect error from an authorization plug-in where the redirect location was too long.
+ ERROR_REDIRECT_LOCATION_TOO_LONG = 0x803381B6,
+
+ /// The WinRM service received a HTTP redirect message redirecting the client but the location URL is invalid.
+ ERROR_REDIRECT_LOCATION_INVALID = 0x803381B7,
+
+ ///
+ /// The WinRM service cannot process the request. The Channel Binding Token Hardening Level (CbtHardeningLevel) value is invalid. The
+ /// valid values are "None", "Relaxed" and "Strict". Change the CbtHardeningLevel value and try again.
+ ///
+ ERROR_SERVICE_CBT_HARDENING_INVALID = 0x803381B8,
+
+ /// The WinRM client cannot process the request because the server name cannot be resolved.
+ ERROR_WSMAN_NAME_NOT_RESOLVED = 0x803381B9,
+
+ ///
+ /// The SSL connection cannot be established. Verify that the service on the remote host is properly configured to listen for HTTPS
+ /// requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or
+ /// WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM
+ /// service: "winrm quickconfig -transport:https".
+ ///
+ ERROR_WSMAN_SSL_CONNECTION_ABORTED = 0x803381BA,
+
+ ///
+ /// The WinRM client cannot process the request. Default authentication may be used with an IP address under the following
+ /// conditions: the transport is HTTPS or the destination is in the TrustedHosts list, and explicit credentials are provided. Use
+ /// winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. For more
+ /// information on how to set TrustedHosts run the following command: winrm help config.
+ ///
+ ERROR_WSMAN_DEFAULTAUTH_IPADDRESS = 0x803381BB,
+
+ /// The WinRM client cannot process the request. Custom Remote Shell has been deprecated and cannot be used.
+ ERROR_WSMAN_CUSTOMREMOTESHELL_DEPRECATED = 0x803381BC,
+
+ /// The WinRM client cannot process the request. The feature in use has been deprecated and cannot be used.
+ ERROR_WSMAN_FEATURE_DEPRECATED = 0x803381BD,
+
+ /// The WinRM client used a parameter to specify the use of SSL while specifying http in the connection string.
+ ERROR_WSMAN_INVALID_USESSL_PARAM = 0x803381BE,
+
+ /// The WinRM service cannot process the request because the security for this resource URI cannot be changed.
+ ERROR_WSMAN_INVALID_CONFIGSDDL_URL = 0x803381BF,
+
+ ///
+ /// The WinRM service cannot process the request. The enumeration request expects a selector based filter to specify the shell identifier.
+ ///
+ ERROR_WSMAN_ENUMERATE_SHELLCOMAMNDS_FILTER_EXPECTED = 0x803381C0,
+
+ /// The WinRM service cannot process the request. The enumeration of end point resources for shell commands is not supported.
+ ERROR_WSMAN_ENUMERATE_SHELLCOMMANDS_EPRS_NOTSUPPORTED = 0x803381C1,
+
+ /// The WinRM Shell client cannot process the request because the shell name has exceeded 255 characters in length.
+ ERROR_WSMAN_CLIENT_CREATESHELL_NAME_INVALID = 0x803381C2,
+
+ ///
+ /// The WinRM runAs configuration operation cannot be completed because the user credentials could not be verified. Verify that the
+ /// username and password used for configuration are valid and retry the operation.
+ ///
+ ERROR_WSMAN_RUNAS_INVALIDUSERCREDENTIALS = 0x803381C3,
+
+ /// The WinRM service cannot process the request because the WinRS shell instance is currently disconnected.
+ ERROR_WINRS_SHELL_DISCONNECTED = 0x803381C4,
+
+ ///
+ /// The WinRM service cannot process the request. This WinRS shell instance does not support disconnect and reconnect operations
+ /// because it was created by an older WinRS client or its provider does not support the disconnect operation.
+ ///
+ ERROR_WINRS_SHELL_DISCONNECT_NOT_SUPPORTED = 0x803381C5,
+
+ /// The WinRM service cannot process the request because the WinRS shell instance is connected to a different client.
+ ERROR_WINRS_SHELL_CLIENTSESSIONID_MISMATCH = 0x803381C6,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WSManDisconnectShell function is null
+ /// or zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_DISCONNECTSHELL_NULL_PARAM = 0x803381C7,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WSManReconnectShell function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_RECONNECTSHELL_NULL_PARAM = 0x803381C8,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WSManConnectShell function is null or
+ /// zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_CONNECTSHELL_NULL_PARAM = 0x803381C9,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WSManConnectShellCommand function is
+ /// null or zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_CONNECTCOMMAND_NULL_PARAM = 0x803381CA,
+
+ /// The WinRM client cannot process the request. The body response is not a valid connect request response.
+ ERROR_WINRS_CONNECT_RESPONSE_BAD_BODY = 0x803381CB,
+
+ /// The WinRM Shell client cannot process the request. The command is currently terminating or was terminated.
+ ERROR_WSMAN_COMMAND_TERMINATED = 0x803381CC,
+
+ /// The WinRM service cannot process the request. The WinRS shell instance is currently connected to a different client.
+ ERROR_WINRS_SHELL_CONNECTED_TO_DIFFERENT_CLIENT = 0x803381CD,
+
+ ///
+ /// The WinRM client encountered an error while communicating with the WinRM service during the disconnect operation. The shell has
+ /// been disconnected and the streams were possibly suspended abruptly.
+ ///
+ ERROR_WINRS_SHELL_DISCONNECT_OPERATION_NOT_GRACEFUL = 0x803381CE,
+
+ ///
+ /// The WinRM client cannot process the request. A disconnect operation cannot be performed on a WinRS shell instance that is already disconnected.
+ ///
+ ERROR_WINRS_SHELL_DISCONNECT_OPERATION_NOT_VALID = 0x803381CF,
+
+ ///
+ /// The WinRM client cannot process the request. A reconnect operation cannot be performed on a WinRS shell instance that is
+ /// currently connected.
+ ///
+ ERROR_WINRS_SHELL_RECONNECT_OPERATION_NOT_VALID = 0x803381D0,
+
+ /// An error was encountered while subscribing to the Group Policy change notification.
+ ERROR_WSMAN_CONFIG_GROUP_POLICY_CHANGE_NOTIFICATION_SUBSCRIPTION_FAILED = 0x803381D1,
+
+ ///
+ /// The WinRM Shell client cannot process the request. One of the parameters required for the WSManReconnectShellCommand function is
+ /// null or zero. Change the request to include the missing parameter and try again.
+ ///
+ ERROR_WSMAN_CLIENT_RECONNECTSHELLCOMMAND_NULL_PARAM = 0x803381D2,
+
+ ///
+ /// The WinRM client cannot process the request. A reconnect operation cannot be performed on a WinRS shell command instance that is
+ /// currently connected.
+ ///
+ ERROR_WINRS_SHELLCOMMAND_RECONNECT_OPERATION_NOT_VALID = 0x803381D3,
+
+ ///
+ /// The WinRM service cannot process the request because the command ID specified by the client is not a valid GUID. Modify the
+ /// request and retry the request.
+ ///
+ ERROR_WINRS_SHELLCOMMAND_CLIENTID_NOT_VALID = 0x803381D4,
+
+ ///
+ /// The WinRM service cannot process the request because the shell ID specified by the client is not a valid GUID. Provide a valid ID
+ /// and try again.
+ ///
+ ERROR_WINRS_SHELL_CLIENTID_NOT_VALID = 0x803381D5,
+
+ /// The WinRM service cannot process the request. A command already exists with the command ID specified by the client.
+ ERROR_WINRS_SHELLCOMMAND_CLIENTID_RESOURCE_CONFLICT = 0x803381D6,
+
+ /// The WinRM service cannot process the request. A resource already exists with the shell ID specified by the client.
+ ERROR_WINRS_SHELL_CLIENTID_RESOURCE_CONFLICT = 0x803381D7,
+
+ ///
+ /// The WinRM client cannot process the request. A disconnect operation cannot be performed on a WinRS shell command instance that is disconnected.
+ ///
+ ERROR_WINRS_SHELLCOMMAND_DISCONNECT_OPERATION_NOT_VALID = 0x803381D8,
+
+ ///
+ /// The WS-Management service cannot process the request. The resource URI for the Subscribe operation must not contain keys.
+ ///
+ ERROR_WSMAN_SUBSCRIBE_WMI_INVALID_KEY = 0x803381D9,
+
+ ///
+ /// The WinRM client cannot process the request. A flag that is not valid was specified for the WSManDisconnectShell method. Remove
+ /// or change the flag and retry the operation.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_DISCONNECT_SHELL_FLAG = 0x803381DA,
+
+ ///
+ /// The WinRM client cannot process the request because the command handle is not associated with the provided shell handle.
+ ///
+ ERROR_WSMAN_CLIENT_INVALID_SHELL_COMMAND_PAIR = 0x803381DB,
+
+ ///
+ /// The WS-Management service did not receive a response for an extended semantics operation within the timeframe specified in the
+ /// OperationTimeout setting.
+ ///
+ ERROR_WSMAN_SEMANTICCALLBACK_TIMEDOUT = 0x803381DC,
+
+ /// The WS-Management service is configured to not allow remote requests.
+ ERROR_WSMAN_SERVICE_REMOTE_ACCESS_DISABLED = 0x803381DD,
+
+ /// The WS-Management service cannot process the request because the stream is currently disconnected.
+ ERROR_WSMAN_SERVICE_STREAM_DISCONNECTED = 0x803381DE,
+
+ ///
+ /// The creation of a new Shell failed. Verify that the RunAsPassword value is correctly configured and that the Group Policy setting
+ /// "Disallow WinRM from storing RunAs credentials" is Disabled or Not Configured. To enable WinRM to store RunAs credentials, change
+ /// this Group Policy setting to Disabled.
+ ///
+ ERROR_WSMAN_CREATESHELL_RUNAS_FAILED = 0x803381DF,
+
+ ///
+ /// The supplied plugin configuration XML is not valid. To enable WinRM to store RunAs credentials, change the "Disallow WinRM from
+ /// storing RunAs credentials" Group Policy setting to Disabled.
+ ///
+ ERROR_WSMAN_INVALID_XML_RUNAS_DISABLED = 0x803381E0,
+
+ ///
+ /// The WinRM client cannot process the request because the XML instance does not match the class schema provided by the server.
+ ///
+ ERROR_WSMAN_WRONG_METADATA = 0x803381E1,
+
+ ///
+ /// The WinRM client cannot process the request because the XML contains an unsupported type. Verify the XML and retry the operation.
+ ///
+ ERROR_WSMAN_UNSUPPORTED_TYPE = 0x803381E2,
+
+ ///
+ /// The WS-Management service cannot process the request. The service is configured to reject remote connection requests for this plugin.
+ ///
+ ERROR_WSMAN_REMOTE_CONNECTION_NOT_ALLOWED = 0x803381E3,
+
+ ///
+ /// The WS-Management service cannot process the request. This user has exceeded the maximum number of concurrent shells allowed for
+ /// this plugin. Close at least one open shell or raise the plugin quota for this user.
+ ///
+ ERROR_WSMAN_QUOTA_MAX_SHELLS_PPQ = 0x803381E4,
+
+ ///
+ /// The WS-Management service cannot process the request. The maximum number of users executing remote operations has been exceeded
+ /// for this plugin. Retry the request later or raise the quota for concurrent users.
+ ///
+ ERROR_WSMAN_QUOTA_MAX_USERS_PPQ = 0x803381E5,
+
+ ///
+ /// The WS-Management service cannot process the request. The maximum number of concurrent shells allowed for this plugin has been
+ /// exceeded. Retry the request later or raise the Maximum Shells per Plugin quota.
+ ///
+ ERROR_WSMAN_QUOTA_MAX_PLUGINSHELLS_PPQ = 0x803381E6,
+
+ ///
+ /// The WS-Management service cannot process the request. The maximum number of concurrent operations allowed for this plugin has
+ /// been exceeded. Retry the request later or raise the Maximum Operations per Plugin quota.
+ ///
+ ERROR_WSMAN_QUOTA_MAX_PLUGINOPERATIONS_PPQ = 0x803381E7,
+
+ ///
+ /// The WS-Management service cannot process the request. This user has exceeded the maximum number of allowed concurrent operations.
+ /// Retry the request later or raise the Maximum Operations per User quota.
+ ///
+ ERROR_WSMAN_QUOTA_MAX_OPERATIONS_USER_PPQ = 0x803381E8,
+
+ ///
+ /// The WS-Management service cannot process the request. The maximum number of concurrent commands per shell has been exceeded.
+ /// Retry the request later or raise the Maximum Commands per Shell quota.
+ ///
+ ERROR_WSMAN_QUOTA_MAX_COMMANDS_PER_SHELL_PPQ = 0x803381E9,
+
+ ///
+ /// The WS-Management service cannot process the request. There are not enough resources available to process this operation. Retry
+ /// the operation later or close one or more of the currently running operations.
+ ///
+ ERROR_WSMAN_QUOTA_MIN_REQUIREMENT_NOT_AVAILABLE_PPQ = 0x803381EA,
+
+ /// The WinRM client cannot process the request because the MI Deserializer cannot be created.
+ ERROR_WSMAN_NEW_DESERIALIZER = 0x803381EB,
+
+ /// The WinRM client cannot process the request because the metadata could not be deserialized.
+ ERROR_WSMAN_DESERIALIZE_CLASS = 0x803381EC,
+
+ /// The WinRM client cannot process the request because the metadata failed to be retrieved from the server.
+ ERROR_WSMAN_GETCLASS = 0x803381ED,
+
+ /// The WinRM client cannot process the request because a WinRM session could not be created.
+ ERROR_WSMAN_NEW_SESSION = 0x803381EE,
+
+ ///
+ /// The WinRM client cannot process the request because the target object has a key property set to NULL. Incomplete objects cannot
+ /// be used as the target of an operation.
+ ///
+ ERROR_WSMAN_NULL_KEY = 0x803381EF,
+
+ ///
+ /// The WinRM client cannot process the request as the server identity could not be verified. If the identity of the server is
+ /// trusted, add it to the TrustedHosts list and retry the request. Use winrm.cmd to configure TrustedHosts. Note that computers in
+ /// the TrustedHosts list might not be authenticated. For more information on how to set TrustedHosts, run the following command:
+ /// winrm help config
+ ///
+ ERROR_WSMAN_MUTUAL_AUTH_FAILED = 0x803381F0,
+
+ /// The WinRM client cannot process the request because the octet string array type is not supported.
+ ERROR_WSMAN_UNSUPPORTED_OCTETTYPE = 0x803381F1,
+
+ /// The WS-Management service cannot process the request. The requested IdleTimeout is outside the allowed range.
+ ERROR_WINRS_IDLETIMEOUT_OUTOFBOUNDS = 0x803381F2,
+
+ ///
+ /// The WinRM client cannot process the request because insufficient metadata is available. The application does not allow all
+ /// properties to be returned as strings, but the server does not support correctly typing the properties. Change the request to
+ /// allow all properties to be returned as strings and retry the request.
+ ///
+ ERROR_WSMAN_INSUFFICIENT_METADATA_FOR_BASIC = 0x803381F3,
+
+ ///
+ /// The WinRM client cannot process the request because the MI_OperationOptions contained both a Resource URI and a Resource URI
+ /// Prefix. Specify only one of these two options and try again.
+ ///
+ ERROR_WSMAN_INVALID_LITERAL_URI = 0x803381F4,
+
+ ///
+ /// The WinRM client cannot process the request because keysOnly and WSMAN_ENUMERATIONMODE_OBJECTONLY were specified at the same
+ /// time. These two settings are incompatible. Remove the WSMAN_ENUMERATIONMODE_OBJECTONLY option, or set keysOnly to MI_FALSE, and
+ /// retry the request.
+ ///
+ ERROR_WSMAN_OBJECTONLY_INVALID = 0x803381F5,
+
+ ///
+ /// The WinRM client cannot process the request because the class name is not valid. Supply a valid class name or set the Resource
+ /// URI option and retry the request.
+ ///
+ ERROR_WSMAN_MISSING_CLASSNAME = 0x803381F6,
+
+ ///
+ /// wsman, code=Sender, subcode=WS-Management UnsupportedFeature, details= /AddressingMode The subscribe packet contains an Encoding
+ /// value that is not valid in the delivery section.
+ ///
+ ERROR_WSMAN_EVENTING_INVALID_ENCODING_IN_DELIVERY = 0x803381F7,
+
+ ///
+ /// The WinRM client cannot process the request. The destination computer name must be a hostname or an IP address, and must not be a
+ /// URL. To use an IPv6 address, enclose the address in brackets, like the following: "[::1]". The transport, port number, and URL
+ /// prefix may be controlled by setting the appropriate destination options. Change the destination computer name string and retry
+ /// the operation.
+ ///
+ ERROR_WSMAN_DESTINATION_INVALID = 0x803381F8,
+
+ ///
+ /// The server does not support WS-Management Identify operations. Skip the TestConnection part of the request and try again.
+ ///
+ ERROR_WSMAN_UNSUPPORTED_FEATURE_IDENTIFY = 0x803381F9,
+
+ ///
+ /// The WS-Management service cannot process the operation. The operation is being attempted on a client session that is unusable.
+ /// This may be related to a recent restart of the WS-Management service. Please create a new client session and retry the operation
+ /// if re-executing the operation does not have undesired behavior.
+ ///
+ ERROR_WSMAN_CLIENT_SESSION_UNUSABLE = 0x803381FA,
+
+ ///
+ /// The WS-Management service cannot process the operation. An attempt to create a virtual account failed. Ensure that WinRM service
+ /// is running as Local System and that it has TCB privilege enabled.
+ ///
+ ERROR_WSMAN_VIRTUALACCOUNT_NOTSUPPORTED = 0x803381FB,
+
+ ///
+ /// The WS-Management service cannot process the operation. Virtual account feature is only available in Windows 7, Server 2008 R2
+ /// and above.
+ ///
+ ERROR_WSMAN_VIRTUALACCOUNT_NOTSUPPORTED_DOWNLEVEL = 0x803381FC,
+
+ ///
+ /// The WS-Management service cannot process the operation. An attempt to logon using the configured RunAs Managed Service Account failed.
+ ///
+ ERROR_WSMAN_RUNASUSER_MANAGEDACCOUNT_LOGON_FAILED = 0x803381FD,
+
+ ///
+ /// The WS-Management service cannot process the operation. An attempt to query mapped credential failed. This will happen if the
+ /// security context associated with WinRM service has changed since the credential was originally mapped.
+ ///
+ ERROR_WSMAN_CERTMAPPING_CREDENTIAL_MANAGEMENT_FAILIED = 0x803381FE,
+
+ /// The event source of the push subscription is in disable or inactive on the Event controller server.
+ ERROR_WSMAN_EVENTING_PUSH_SUBSCRIPTION_NOACTIVATE_EVENTSOURCE = 0x803381FF,
+ }
+}
\ No newline at end of file
diff --git a/UnitTests/PInvoke/WsmSvc/WsmSvcTests.cs b/UnitTests/PInvoke/WsmSvc/WsmSvcTests.cs
index c8c0916c..ad2b6647 100644
--- a/UnitTests/PInvoke/WsmSvc/WsmSvcTests.cs
+++ b/UnitTests/PInvoke/WsmSvc/WsmSvcTests.cs
@@ -7,17 +7,17 @@ namespace Vanara.PInvoke.Tests;
public class ShellClient : IDisposable
{
- private SafeWSMAN_API_HANDLE m_apiHandle;
+ private SafeWSMAN_API_HANDLE? m_apiHandle;
private WSMAN_SHELL_ASYNC m_async;
private bool m_bExecute;
private bool m_bSetup;
private WSMAN_COMMAND_HANDLE m_command;
private Win32Error m_errorCode;
- private SafeEventHandle m_event;
+ private SafeEventHandle? m_event;
private WSMAN_SHELL_ASYNC m_ReceiveAsync;
private Win32Error m_ReceiveErrorCode;
- private SafeEventHandle m_ReceiveEvent;
- private SafeWSMAN_SESSION_HANDLE m_session;
+ private SafeEventHandle? m_ReceiveEvent;
+ private SafeWSMAN_SESSION_HANDLE? m_session;
private WSMAN_SHELL_HANDLE m_shell;
// Constructor.
@@ -26,12 +26,13 @@ public class ShellClient : IDisposable
}
// Clean up the used resources
- public void Dispose()
+ void IDisposable.Dispose()
{
if (!m_command.IsNull)
{
WSManCloseCommand(m_command, 0, m_async);
- WaitForSingleObject(m_event, INFINITE);
+ if (m_event is not null && !m_event.IsClosed)
+ WaitForSingleObject(m_event, INFINITE);
if (Win32Error.NO_ERROR != m_errorCode)
{
wprintf("WSManCloseCommand failed: {0}\n", m_errorCode);
@@ -45,7 +46,8 @@ public class ShellClient : IDisposable
if (!m_shell.IsNull)
{
WSManCloseShell(m_shell, 0, m_async);
- WaitForSingleObject(m_event, INFINITE);
+ if (m_event is not null && !m_event.IsClosed)
+ WaitForSingleObject(m_event, INFINITE);
if (Win32Error.NO_ERROR != m_errorCode)
{
wprintf("WSManCloseShell failed: {0}\n", m_errorCode);
@@ -67,10 +69,12 @@ public class ShellClient : IDisposable
m_bSetup = false;
m_bExecute = false;
+
+ GC.SuppressFinalize(this);
}
// Execute shell-related operations
- public bool Execute(string resourceUri, string commandLine, byte[] sendData, uint count)
+ public bool Execute(string resourceUri, string commandLine, byte[]? sendData, uint count)
{
if (!m_bSetup)
{
@@ -85,8 +89,9 @@ public class ShellClient : IDisposable
m_bExecute = true;
// WSManCreateShell
- WSManCreateShell(m_session, 0, resourceUri, default, default, default, m_async, out m_shell);
- WaitForSingleObject(m_event, INFINITE);
+ WSManCreateShell(m_session!, 0, resourceUri, default, default, default, m_async, out m_shell);
+ if (m_event is not null && !m_event.IsClosed)
+ WaitForSingleObject(m_event, INFINITE);
if (Win32Error.NO_ERROR != m_errorCode)
{
wprintf("WSManCreateShell failed: {0}\n", m_errorCode);
@@ -95,7 +100,8 @@ public class ShellClient : IDisposable
// WSManRunShellCommand
WSManRunShellCommand(m_shell, 0, commandLine, default, default, m_async, out m_command);
- WaitForSingleObject(m_event, INFINITE);
+ if (m_event is not null && !m_event.IsClosed)
+ WaitForSingleObject(m_event, INFINITE);
if (Win32Error.NO_ERROR != m_errorCode)
{
wprintf("WSManRunShellCommand failed: {0}\n", m_errorCode);
@@ -119,7 +125,8 @@ public class ShellClient : IDisposable
}
// Receive operation is finished
- WaitForSingleObject(m_ReceiveEvent, INFINITE);
+ if (m_ReceiveEvent is not null && !m_ReceiveEvent.IsClosed)
+ WaitForSingleObject(m_ReceiveEvent, INFINITE);
if (Win32Error.NO_ERROR != m_ReceiveErrorCode)
{
wprintf("WSManReceiveShellOutput failed: {0}\n", m_ReceiveErrorCode);
@@ -131,7 +138,7 @@ public class ShellClient : IDisposable
}
// Initialize session for subsequent operations
- public bool Setup(string connection, WSManAuthenticationFlags authenticationMechanism, string username, string password)
+ public bool Setup(string connection, WSManAuthenticationFlags authenticationMechanism, string? username, string? password)
{
if (m_bSetup) return true;
@@ -216,7 +223,7 @@ public class ShellClient : IDisposable
m_ReceiveErrorCode = error.code;
// NOTE: if the errorDetail needs to be used outside of the callback, then need to allocate memory, copy the content to that
// memory as error.errorDetail itself is owned by WSMan client stack and will be deallocated and invalid when the callback exits
- wprintf(error.errorDetail);
+ wprintf(error.errorDetail ?? "");
}
// Output the received data to the console
@@ -233,7 +240,7 @@ public class ShellClient : IDisposable
// for WSManReceiveShellOutput, needs to wait for state to be done before signalliing the end of the operation
if ((0 != error.code) || (pdata != default && !data.commandState.IsNull && string.Compare(data.commandState, WSMAN_COMMAND_STATE_DONE) == 0))
{
- SetEvent(m_ReceiveEvent);
+ m_ReceiveEvent?.Set();
}
}
@@ -246,14 +253,14 @@ public class ShellClient : IDisposable
m_errorCode = error.code;
// NOTE: if the errorDetail needs to be used outside of the callback, then need to allocate memory, copy the content to that
// memory as error->errorDetail itself is owned by WSMan client stack and will be deallocated and invalid when the callback exits
- wprintf(error.errorDetail);
+ wprintf(error.errorDetail ?? "");
}
// for non-receieve operation, the callback simply signals the async operation is finished
- SetEvent(m_event);
+ m_event?.Set();
}
- private bool Send(byte[] sendData, bool endOfStream)
+ private bool Send(byte[]? sendData, bool endOfStream)
{
// WSManSendShellInput
var streamData = new WSMAN_DATA
@@ -268,7 +275,8 @@ public class ShellClient : IDisposable
streamData.union.binaryData.data = pSendData;
}
WSManSendShellInput(m_shell, m_command, 0, WSMAN_STREAM_ID_STDIN, streamData, endOfStream, m_async, out SafeWSMAN_OPERATION_HANDLE sendOperation);
- WaitForSingleObject(m_event, INFINITE);
+ if (m_event is not null && !m_event.IsClosed)
+ WaitForSingleObject(m_event, INFINITE);
if (Win32Error.NO_ERROR != m_errorCode)
{
wprintf("WSManSendShellInput failed: {0}\n", m_errorCode);
@@ -279,7 +287,7 @@ public class ShellClient : IDisposable
return true;
}
- private void wprintf(string fmt, params object[] p) => TestContext.Write(fmt, p);
+ private static void wprintf(string fmt, params object[] p) => TestContext.Write(fmt, p);
}
[TestFixture]