3.2.5.3.2 Rules for the wxf:ResourceCreated Message

A client uses the wxf:Create message to create a RunspacePool on the server, as specified in section 3.1.5.3.1. A server implementation MUST process the wxf:Create message and send either a success response (using the wxf:ResourceCreated message specified in [MS-WSMV], section 3.1.4.5.2) or a failure response (using the wxf:Fault message, specified in [MS-WSMV] section 2.2.4.43). The server MUST use wxf:ReceiveResponse messages to send any data (section 3.2.5.3.8) targeted to that RunspacePool.

The wxf:Create message sent by clients MUST contain an option with the name "protocolversion" and the value "2.1" or "2.2". If the server does not accept a client's protocol version, the server MUST send an error message to the client using a wxf:Fault message as specified in [MS-WSMV], section 2.2.4.43.

The following information MUST be included in the wxf:Fault message.

Element

Value

Code

2152991685

Machine

A string that SHOULD specify the machine name where this fault occurred.

Message

A string message in the following format.

 <PSProtocolVersionError   ServerProtocolVersion="x.y"   ServerBuildVersion="a.b.cdef.g">detailed error message   </PSProtocolVersionError>

Where "x.y" represents the server's ProtocolVersion (currently 2.1), and "a.b.cdef.g" represents the server's build number (such as 7.0.7000.0).

A server MUST be compatible with minor version changes; in other words, a server could accept a client's packet even if the protocol version was specified as "2.1".

Upon successful processing of a wxf:Create message, the PowerShell Remoting Protocol MUST create a Shell instance, store it in a WSMV shell to a RunspacePool table (section 3.2.1.1.1), and return a reference to it as wsa:EndPointReference as specified in [WSAddressing] and constrained by [DMTF-DSP0226].

The wsa:EndpointReference encapsulated within the wxf:ResourceCreated (as specified in [MS-WSMV] section 3.1.4.5.2) contains a reference to the newly created Shell instance. This address is used in all subsequent messages to the Shell instance; that is, it is used in wxf:Delete (section 3.1.5.3.11), wxf:Command (section 3.1.5.3.3), wxf:Signal (section 3.1.5.3.9), wxf:Send (section 3.1.5.3.5), and wxf:Receive (section 3.1.5.3.7) messages. The following list describes the additional normative constraints on the wsa:EndpointReference message.

  • ReferenceParametersp: This required element identifies the created Shell instance.

  • ResourceURI: The value of ResourceURI is implementation-specific.<13>

  • SelectorSet: The value of the Name attribute of the Selector element MUST contain the GUID identifying the new Shell.