Edit

Share via


Windows Remote Management

Overview of the Windows Remote Management technology.

To develop Windows Remote Management, you need these headers:

For programming guidance for this technology, see:

Enumerations

 
WSManAuthenticationFlags

Determines the authentication method for the operation.
WSManCallbackFlags

Defines a set of flags used by all callback functions.
WSManDataType

Specifies the current data type of the union in the WSMAN_DATA structure.
WSManProxyAccessType

Defines the proxy access type.
WSManProxyAccessTypeFlags

Defines the proxy access type flags.
WSManProxyAuthenticationFlags

Determines the proxy authentication mechanism.
WSManSessionOption

Defines a set of extended options for the session. These options are used with the WSManSetSessionOption method.

Functions

 
AddOption

Adds data required to process the request. For example, some WMI providers may require an IWbemContext or SWbemNamedValueSet object with provider-specific information.
AddSelector

Adds a selector to the ResourceLocator object. The selector specifies a particular instance of a resource.
ClearOptions

Removes any options from the ResourceLocator object.
ClearSelectors

Removes all the selectors from a ResourceLocator object. You can provide a ResourceLocator object instead of specifying a resource URI in IWSManSession object operations such as Get, Put, or Enumerate.
Create

Creates a new instance of a resource and returns the endpoint reference (EPR) of the new object.
CreateConnectionOptions

Creates an IWSManConnectionOptions object that specifies the user name and password used when creating a session.
CreateResourceLocator

Creates a ResourceLocator object that can be used instead of a resource URI in Session object operations such as IWSManSession.Get, IWSManSession.Put, or Session.Enumerate.
CreateSession

Creates a Session object that can then be used for subsequent network operations.
Delete

Deletes the resource specified in the resource URI.
Enumerate

Enumerates a table, data collection, or log resource.
EnumerationFlagHierarchyDeep

Returns the value of the enumeration constant EnumerationFlagHierarchyDeep for use in the flags parameter of the IWSManSession::Enumerate method.
EnumerationFlagHierarchyDeepBasePropsOnly

Returns the value of the enumeration constant EnumerationFlagHierarchyDeepBasePropsOnly for use in the flags parameter of the IWSManSession::Enumerate method.
EnumerationFlagHierarchyShallow

Returns the value of the enumeration constant EnumerationFlagHierarchyShallow for use in the flags parameter of the IWSManSession::Enumerate method.
EnumerationFlagNonXmlText

Returns the value of the enumeration constant WSManFlagNonXmlText for use in the flags parameter of the IWSManSession::Enumerate method.
EnumerationFlagReturnEPR

Returns the value of the enumeration constant EnumerationFlagReturnEPR for use in the flags parameter of the IWSManSession::Enumerate method.
EnumerationFlagReturnObject

Returns the value of the enumeration constant EnumerationFlagReturnObject for use in the flags parameter of the IWSManSession::Enumerate method.
EnumerationFlagReturnObjectAndEPR

Returns the value of the enumeration constant EnumerationFlagReturnObjectAndEPR for use in the flags parameter of the IWSManSession::Enumerate method.
Get

Retrieves the resource specified by the URI and returns an XML representation of the current instance of the resource.
get_AtEndOfStream

Indicates that the end of items in the IWSManEnumerator object has been reached by calls to IWSManEnumerator::ReadItem.
get_BatchItems

Sets and gets the number of items in each enumeration batch. (Get)
get_CertificateThumbprint

Sets or gets the certificate thumbprint to use when authenticating by using client certificate authentication. (Get)
get_CommandLine

Gets the command line of the process that loads the automation component.
get_Error

Gets additional error information, in an XML stream, for the preceding call to an IWSMan method if Windows Remote Management service was unable to create an IWSManSession object, an IWSManConnectionOptions object, or an IWSManResourceLocator object.
get_Error

Gets an XML representation of additional error information. (IWSManEnumerator.get_Error)
get_Error

Gets an XML representation of additional error information. (IWSManResourceLocator.get_Error)
get_Error

Gets additional error information in an XML stream for the preceding call to an IWSManSession object method.
get_FragmentDialect

Gets or sets the language dialect for a resource fragment dialect when IWSManResourceLocator is used in IWSManSession object methods such as Get, Put, or Enumerate. (Get)
get_FragmentPath

Gets or sets the path for a resource fragment or property when ResourceLocator is used in IWSManSession object methods such as Get, Put, or Enumerate. (Get)
get_MustUnderstandOptions

Gets or sets the MustUnderstandOptions value for the ResourceLocator object. (Get)
get_ResourceURI

The resource URI of the requested resource. This property can contain only the path, not a query string for specific instances. (Get)
get_Timeout

Sets and gets the maximum amount of time, in milliseconds, that the client application waits for Windows Remote Management to complete its operations. (Get)
get_UserName

Sets and gets the user name of a local or a domain account on the remote computer. This property determines the user name for authentication. (Get)
GetErrorMessage

Returns a formatted string containing the text of an error number.
Identify

Queries a remote computer to determine if it supports the WS-Management protocol.
Invoke

Invokes a method and returns the results of the method call.
ProxyAuthenticationUseBasic

Returns the value of the proxy authentication flag WSManFlagProxyAuthenticationUseBasic for use in the authenticationMechanism parameter of the IWSManConnectionOptionsEx2::SetProxy method.
ProxyAuthenticationUseDigest

Returns the value of the proxy authentication flag WSManFlagProxyAuthenticationUseDigest for use in the authenticationMechanism parameter of the IWSManConnectionOptionsEx2::SetProxy method.
ProxyAuthenticationUseNegotiate

Returns the value of the proxy authentication flag WSManFlagProxyAuthenticationUseNegotiate for use in the authenticationMechanism parameter of the IWSManConnectionOptionsEx2::SetProxy method.
ProxyAutoDetect

Returns the value of the proxy access type flag WSManProxyAutoDetect for use in the accessType parameter of the IWSManConnectionOptionsEx2::SetProxy method.
ProxyIEConfig

Returns the value of the proxy access type flag WSManProxyIEConfig for use in the accessType parameter of the IWSManConnectionOptionsEx2::SetProxy method.
ProxyNoProxyServer

Returns the value of the proxy access type flag WSManProxyNoProxyServer for use in the accessType parameter of the IWSManConnectionOptionsEx2::SetProxy method.
ProxyWinHttpConfig

Returns the value of the proxy access type flag WSManProxyWinHttpConfig for use in the accessType parameter of the IWSManConnectionOptionsEx2::SetProxy method.
Put

Updates a resource.
put_BatchItems

Sets and gets the number of items in each enumeration batch. (Put)
put_CertificateThumbprint

Sets or gets the certificate thumbprint to use when authenticating by using client certificate authentication. (Put)
put_FragmentDialect

Gets or sets the language dialect for a resource fragment dialect when IWSManResourceLocator is used in IWSManSession object methods such as Get, Put, or Enumerate. (Put)
put_FragmentPath

Gets or sets the path for a resource fragment or property when ResourceLocator is used in IWSManSession object methods such as Get, Put, or Enumerate. (Put)
put_MustUnderstandOptions

Gets or sets the MustUnderstandOptions value for the ResourceLocator object. (Put)
put_Password

Sets the password of a local or a domain account on the remote computer.
put_ResourceURI

The resource URI of the requested resource. This property can contain only the path, not a query string for specific instances. (Put)
put_Timeout

Sets and gets the maximum amount of time, in milliseconds, that the client application waits for Windows Remote Management to complete its operations. (Put)
put_UserName

Sets and gets the user name of a local or a domain account on the remote computer. This property determines the user name for authentication. (Put)
ReadItem

Retrieves an item from the resource and returns an XML representation of the item.
SessionFlagCredUsernamePassword

Returns the value of the authentication flag WSManFlagCredUsernamePassword for use in the flags parameter of IWSMan::CreateSession.
SessionFlagEnableSPNServerPort

Returns the value of the authentication flag WSManFlagEnableSPNServerPort for use in the flags parameter of IWSMan::CreateSession.
SessionFlagNoEncryption

Returns the value of the authentication flag WSManFlagNoEncryption for use in the flags parameter of IWSMan::CreateSession.
SessionFlagSkipCACheck

Returns the value of the WSManFlagSkipCACheck authentication flag for use in the flags parameter of the IWSMan::CreateSession method.
SessionFlagSkipCNCheck

Returns the value of the authentication flag WSManFlagSkipCNCheck for use in the flags parameter of IWSMan::CreateSession.
SessionFlagUseBasic

Returns the value of the authentication flag WSManFlagUseBasic for use in the flags parameter of IWSMan::CreateSession.
SessionFlagUseClientCertificate

Returns the value of the authentication flag WSManFlagUseClientCertificate for use in the flags parameter of IWSMan::CreateSession.
SessionFlagUseCredSsp

Returns the value of the authentication flag WSManFlagUseCredSsp for use in the flags parameter of IWSMan::CreateSession.
SessionFlagUseDigest

Returns the value of the authentication flag WSManFlagUseDigest for use in the flags parameter of IWSMan::CreateSession.
SessionFlagUseKerberos

Returns the value of the authentication flag WSManFlagUseKerberos for use in the flags parameter of IWSMan::CreateSession.
SessionFlagUseNegotiate

Returns the value of the authentication flag WSManFlagUseNegotiate for use in the flags parameter of IWSMan::CreateSession.
SessionFlagUseNoAuthentication

Returns the value of the authentication flag WSManFlagUseNoAuthentication for use in the flags parameter of IWSMan::CreateSession.
SessionFlagUTF8

Returns the value of the authentication flag WSManFlagUTF8 for use in the flags parameter of IWSMan::CreateSession.
SetProxy

Sets the proxy information for the session.
WSMAN_PLUGIN_AUTHORIZE_OPERATION

Authorizes a specific operation.
WSMAN_PLUGIN_AUTHORIZE_QUERY_QUOTA

Retrieves quota information for the user after a connection has been authorized.
WSMAN_PLUGIN_AUTHORIZE_RELEASE_CONTEXT

Releases the context that a plug-in reports from either WSManPluginAuthzUserComplete or WSManPluginAuthzOperationComplete.
WSMAN_PLUGIN_AUTHORIZE_USER

Authorizes a connection.
WSMAN_PLUGIN_COMMAND

Defines the command callback for a plug-in.
WSMAN_PLUGIN_CONNECT

Defines the connect callback for a plug-in.
WSMAN_PLUGIN_RECEIVE

Defines the receive callback for a plug-in.
WSMAN_PLUGIN_RELEASE_COMMAND_CONTEXT

Defines the release command callback for the plug-in.
WSMAN_PLUGIN_RELEASE_SHELL_CONTEXT

Defines the release shell callback for the plug-in.
WSMAN_PLUGIN_SEND

Defines the send callback for a plug-in.
WSMAN_PLUGIN_SHELL

Defines the shell callback for a plug-in.
WSMAN_PLUGIN_SHUTDOWN

Defines the shutdown callback for the plug-in.
WSMAN_PLUGIN_SIGNAL

Defines the signal callback for a plug-in.
WSMAN_PLUGIN_STARTUP

Defines the startup callback for the plug-in.
WSMAN_SHELL_COMPLETION_FUNCTION

The callback function that is called for shell operations, which result in a remote request.
WSManCloseCommand

Deletes a command and frees the resources that are associated with it.
WSManCloseOperation

Cancels or closes an asynchronous operation.
WSManCloseSession

Closes a session object.
WSManCloseShell

Deletes a shell object and frees the resources associated with the shell.
WSManConnectShell

Connects to an existing server session.
WSManConnectShellCommand

Connects to an existing command running in a shell.
WSManCreateSession

Creates a session object.
WSManCreateShell

Creates a shell object.
WSManCreateShellEx

Creates a shell object by using the same functionality as the WSManCreateShell function, with the addition of a client-specified shell ID.
WSManDeinitialize

Deinitializes the Windows Remote Management client stack.
WSManDisconnectShell

Disconnects the network connection of an active shell and its associated commands.
WSManGetErrorMessage

Retrieves the error messages associated with a particular error and language codes.
WSManGetSessionOptionAsDword

Gets the value of a session option. (WSManGetSessionOptionAsDword)
WSManGetSessionOptionAsString

Gets the value of a session option. (WSManGetSessionOptionAsString)
WSManInitialize

Initializes the Windows Remote Management Client API.
WSManPluginAuthzOperationComplete

Reports either a successful or failed authorization for a user operation.
WSManPluginAuthzQueryQuotaComplete

Called from the WSManPluginAuthzQueryQuota plug-in entry point and must be called whether or not the plug-in can carry out the request.
WSManPluginAuthzUserComplete

Reports either a successful or failed user connection authorization.
WSManPluginFreeRequestDetails

Releases memory that is allocated for the WSMAN_PLUGIN_REQUEST structure, which is passed into operation plug-in entry points.
WSManPluginGetOperationParameters

Gets operational information for items such as time-outs and data restrictions that are associated with the operation.
WSManPluginOperationComplete

Reports the completion of an operation by all operation entry points except for the WSManPluginStartup and WSManPluginShutdown methods.
WSManPluginReceiveResult

Reports results for the WSMAN_PLUGIN_RECEIVE plug-in call and is used by most shell plug-ins that return results.
WSManPluginReportContext

Reports shell and command context back to the Windows Remote Management (WinRM) infrastructure so that further operations can be performed against the shell and/or command.
WSManReceiveShellOutput

Retrieves output from a running command or from the shell.
WSManReconnectShell

Reconnects a previously disconnected shell session. To reconnect the shell session's associated commands, use WSManReconnectShellCommand.
WSManReconnectShellCommand

Reconnects a previously disconnected command.
WSManRunShellCommand

Starts the execution of a command within an existing shell and does not wait for the completion of the command.
WSManRunShellCommandEx

Provides the same functionality as the WSManRunShellCommand function, with the addition of a command ID option.
WSManSendShellInput

Ipes the input stream to a running command or to the shell.
WSManSetSessionOption

Sets an extended set of options for the session.
WSManSignalShell

Sends a control code to an existing command or to the shell itself.

Interfaces

 
IWSMan

Provides methods and properties used to create a session, represented by a Session object.
IWSManConnectionOptions

The IWSManConnectionOptions object is passed to the IWSMan::CreateSession method to provide the user name and password associated with the local account on the remote computer.
IWSManConnectionOptionsEx

The IWSManConnectionOptionsEx object is passed to the IWSMan::CreateSession method to provide the thumbprint of the client certificate used for authentication.
IWSManConnectionOptionsEx2

The IWSManConnectionOptionsEx2 object is passed to the IWSMan::CreateSession method to provide the authentication mechanism, access type, and credentials to connect to a proxy server.
IWSManEnumerator

Represents a stream of results returned from operations such as a WS-Management protocol WS-Enumeration:Enumerate operation.
IWSManEx

Extends the methods and properties of the IWSMan interface to include creating IWSManResourceLocator objects, methods that return enumeration and session flag values, and a method to get extended error information.
IWSManEx2

Extends the methods and properties of the IWSManEx interface to include a method that returns a session flag value related to authentication using client certificates.
IWSManEx3

Extends the methods and properties of the IWSManEx interface to include a method that returns a session flag value related to authentication using the Credential Security Support Provider (CredSSP).
IWSManResourceLocator

Supplies the path to a resource. You can use an IWSManResourceLocator object instead of a resource URI in IWSManSession object operations such as IWSManSession.Get, IWSManSession.Put, or IWSManSession.Enumerate.
IWSManSession

Defines operations and session settings.

Structures

 
WSMAN_AUTHENTICATION_CREDENTIALS

Defines the authentication method and the credentials used for server or proxy authentication.
WSMAN_AUTHZ_QUOTA

Reports quota information on a per-user basis for authorization plug-ins.
WSMAN_CERTIFICATE_DETAILS

Stores client information for an inbound request that was sent with a client certificate.
WSMAN_COMMAND_ARG_SET

Represents the set of arguments that are passed in to the command line.
WSMAN_DATA

Contains inbound and outbound data used in the Windows Remote Management (WinRM) API.
WSMAN_DATA_BINARY

Holds binary data for use with various Windows Remote Management functions.
WSMAN_DATA_TEXT

Holds textual data for use with various Windows Remote Management functions.
WSMAN_ENVIRONMENT_VARIABLE

Defines an individual environment variable by using a name and value pair.
WSMAN_ENVIRONMENT_VARIABLE_SET

Defines an array of environment variables.
WSMAN_ERROR

Contains error information that is returned by a Windows Remote Management (WinRM) client.
WSMAN_FILTER

WSMAN_FILTER is reserved for future use.
WSMAN_FRAGMENT

WSMAN_FRAGMENT is reserved for future use.
WSMAN_KEY

Represents a key and value pair within a selector set and is used to identify a particular resource.
WSMAN_OPERATION_INFO

Represents a specific resource endpoint for which the plug-in must perform the request.
WSMAN_OPTION

Represents a specific option name and value pair.
WSMAN_OPTION_SET

Represents a set of options.
WSMAN_PLUGIN_REQUEST

Specifies information for a plug-in request.
WSMAN_PROXY_INFO

Specifies proxy information.
WSMAN_RECEIVE_DATA_RESULT

Represents the output data received from a WSManReceiveShellOutput method.
WSMAN_RESPONSE_DATA

Represents the output data received from a WSMan operation.
WSMAN_SELECTOR_SET

Defines a set of keys that represent the identity of a resource.
WSMAN_SENDER_DETAILS

Specifies the client details for every inbound request.
WSMAN_SHELL_ASYNC

Defines an asynchronous structure to be passed to all shell operations.
WSMAN_SHELL_DISCONNECT_INFO

Specifies the maximum duration, in milliseconds, the shell will stay open after the client has disconnected.
WSMAN_SHELL_STARTUP_INFO_V10

The WSMAN_SHELL_STARTUP_INFO_V10 (wsman.h) structure defines the shell startup parameters to be used with the WSManCreateShell function.
WSMAN_SHELL_STARTUP_INFO_V11

The WSMAN_SHELL_STARTUP_INFO_V11 (wsman.h) structure defines the shell startup parameters to be used with the WSManCreateShell function.
WSMAN_STREAM_ID_SET

Lists all the streams that are used for either input or output for the shell and commands.
WSMAN_USERNAME_PASSWORD_CREDS

Defines the credentials used for authentication.