TerminalServicesProvider::ControlSession

The ControlSession method logs off or disconnects the specified session on the specified server.

Arguments

Input Arguments Required Description

<server>

Yes

The name of the server on which the specified session is running.

<sessionId>

Yes

The sessionId of the session to be logged off or disconnected.

<action>

Yes

The action to be performed: "logoff" or "disconnect"

Remarks

Rollback

Not implemented, because it is not possible to roll back this action.

Underlying API

WTSLogoffSession or WTSDisconnectSession

Sample Code

Example XML Request

<request> 
  <procedure> 
    <execute namespace="Terminal Services Provider" procedure="ControlSession"> 
      <executeData> 
        <server>TheServer</server> 
        <sessionId>2</sessionId> 
        <action>disconnect</action> 
      </executeData> 
    </execute> 
  </procedure> 
</request> 

Applies To

Terminal Services Provider

See also

Tasks

TerminalServicesProvider::GetSessions