3.2.4.2.3 Executing WMI Operations with PowerShell Semantics
The WS-Management Protocol can be used to execute operations on CIM resources that support certain PowerShell semantics. These semantics are associated with PowerShell Remoting Protocol messages, as given in the following table, and are documented in [MS-PSRP].
PowerShell Semantic |
Associated Message |
---|---|
Verbose |
VERBOSE_RECORD |
Debug |
DEBUG_RECORD |
WarningAction |
WARNING_RECORD |
ErrorAction |
ERROR_RECORD |
Confirm |
PIPELINE_HOST_CALL |
Progress |
PROGRESS_RECORD |
CIM resources can support one or more PowerShell semantics. Further, these extended semantics are grouped into categories according to their effect on input, output, and server-side processing.
Category |
Semantics |
---|---|
Options that create additional server output |
|
Options that modify execution on the server but do not require additional input |
|
Options that require additional input from the client. |
|
For options that only create additional server output, the message flow is as follows. Although the Verbose option triggers the largest amount of additional output, the overall pattern of messages is the same for all options that only create additional server output. In the following diagram, "[C1]" indicates that the messages are transmitted on the primary HTTP connection.
Figure 9: Message sequence for options that create additional server output
The client sends the CIM Operation Request message with the Verbose option specified.
The server returns the verbose output in SOAP Response messages, as output is generated by the CIM operation.
The server sends the CIM Operation Response message as it normally would in the absence of the Verbose option.
For operations that modify server execution but do not require additional client input, the pattern is as follows.
The client sends the CIM Operation Request message, with the appropriate option specified, on the primary HTTP connection.
The server returns any generated output in SOAP Response messages, as output is generated by the CIM operation, on the primary HTTP connection.
The server returns the CIM Operation Response message that is the response to the original CIM Operation Request message.
For operations that require additional client input, the message sequence is as follows. The optional Confirm option triggers the exchange of a pair of Confirm Request and Confirm Response messages, but otherwise, the pattern of messages is the same for all options in this category. In the following diagram, [C1] and [C2] indicate that messages are transmitted on the primary and secondary HTTP connections, respectively.
Figure 10: Message sequence for options that require additional client input
The client sends the CIM Operation Request message, with the Confirm option specified.
The server returns the Confirm request in SOAP Response message.
The client sends an acknowledgment of the Confirm request on a secondary connection. Any additional input to this operation from the client will also be transmitted over the secondary connection.
The server returns the CIM Operation Response message that is the response to the original CIM Operation Request message.