TerminalServicesProvider::SendSessionMessage
The SendSessionMessage method sends the specified message to the specified Terminal Services session on the specified server. This may be used to notify users of server events (for example, reboot) that will affect their sessions.
Arguments
Input Arguments | Required | Description |
---|---|---|
<server> |
Yes |
The name of the server on which the specified session is running and to which the message should be sent. |
<sessionId> |
Yes |
The sessionId of the session to which the message should be sent. |
<message> |
Yes |
The text message to be sent. |
Remarks
Rollback
Not implemented, because it is not possible to roll back this action.
Underlying API
WTSSendMessage
Sample Code
Example XML Request
<request>
<procedure>
<execute namespace="Terminal Services Provider" procedure="SendSessionMessage">
<executeData>
<server>TheServer</server>
<sessionId>2</sessionId>
<message>Session ending. Please log off.</message>
</executeData>
</execute>
</procedure>
</request>