3.1.5.3.3 Rules for the wxf:Command Message
The PowerShell Remoting Protocol executes a pipeline on the remote RunspacePool (created using a remote shell as described in 3.1.5.3.1) by sending a wxf:Command message to the remote shell, as specified in [MS-WSMV] section 3.1.4.11. The header of the wxf:Command message MUST contain the following information.
Element |
Value |
---|---|
ResourceURI |
Any string, per the rules specified in [MS-WSMV] section 3.1.4.5.2. <6> |
ShellID selector |
The ShellID returned in the wxf:ResourceCreated message (see section 3.1.5.3.2). |
The body of the message MUST contain a command line complex type as described in [MS-WSMV] section 2.2.4.7. The following information is supplied for the required values in the command line complex type.
Element |
Value |
---|---|
Command |
MUST be empty. |
Arguments |
The first fragment of the serialized pipeline. This first fragment MUST be base64-encoded before including the data in the Arguments element. The remaining fragments MUST be sent using the Send message to the command as described in [MS-WSMV] section 3.1.4.13. |
If the wxf:Command message is successfully received and processed by the server, the server MUST send either a success or a failure message. In either case, a response is sent from the server. A wxf:CommandResponse message, described in [MS-WSMV] section 2.2.4.8, is sent to notify success. A wxf:Fault message, specified in [MS-WSMV] section 2.2.4.43, is sent to notify failure.
The PSRP messages CREATE_PIPELINE (section 3.1.5.4.10) and GET_COMMAND_METADATA (section 2.2.2.14) MAY be sent using a wxf:Command message. The client MUST NOT send any other PSRP messages using a wxf:Command message.