3.1.5.3.15 Rules for the wxf:ConnectResponse Message

The server sends a wxf:ConnectResponse message upon successful processing of a wxf:Connect message, as specified in [MS-WSMV] section 3.1.4.17.

The server sends back its SESSION_CAPABILITY message (section 2.2.2.1) as part of the wxf:ConnectResponse message. The client terminates the connection process and set the state of the RunspacePool to Broken if a SESSION_CAPABILITY message is not received as part of the wxf:ConnectResponse message.

The SESSION_CAPABILITY message is included in the ConnectResponse message as a base-64 encoded string inside a <connectResponseXml> tag. The base-64 encoded string is a serialized complex object (section 2.2.5.2).

Example response:

 <rsp:ConnectResponse>
     <rsp:InputStreams>stdinpr</rsp:InputStreams>
     <rsp:OutputStreams>stdout</rsp:OutputStreams>
     <connectResponseXml xmlns="http://schemas.microsoft.com/powershell">
         Base64-Encoded data
     </connectResponseXml>
 </rsp:ConnectResponse>
  
 Decoded SESSION_CAPABILITY
 <connectResponseXml xmlns="http://schemas.microsoft.com/powershell">
   <Obj RefId="0">
     <MS>
       <Version N="protocolversion">2.2</Version> 
       <Version N="PSVersion">2.0</Version> 
       <Version N="SerializationVersion">1.1.0.1</Version> 
     </MS>
   </Obj>
 </connectResponseXml>