3.1.5.3.18 Rules for the wxf:Reconnect Message

The PowerShell Remoting Protocol reconnects to a RunspacePool that has been previously disconnected by a wxf:Disconnect message (section 3.1.5.3.16), by sending a wxf:Reconnect message to the remote shell as specified in [MS-WSMV] section 3.1.4.16. The header of the wxf:Reconnect message MUST contain the following information.

Element

Value

ResourceURI

Any string that satisfies the rules specified in [MS-WSMV] section 3.1.4.5.2.<12>

ShellID selector

The ShellID returned in the wxf:ResourceCreated message (see section 3.1.5.3.2).

The body of the message MAY contain the following optional elements.

Element

Value

BufferMode

Either of the strings "Drop" or "Block", which indicate the buffering mode the server will use when the shell is later disconnected.

If the wxf:Reconnect message is successfully received and processed by the server, the server MUST send either a success or a failure message. A wxf:ReconnectResponse message, as specified in [MS-WSMV] section 3.1.4.16, indicates success. A wxf:Fault message, specified in [MS-WSMV] section 2.2.4.43, indicates failure.

A wxf:Reconnect message sent to a shell does not automatically reconnect any commands associated with it. A second wxf:Reconnect message with the following additional element in its body MUST be sent to reconnect to a particular command.

Element

Value

CommandID

The identifier of the command, returned as part of a wxf:CommandResponse message (section 3.1.5.3.4).