Managed Terminal Services::TSDisableUser

The method disables the specified user to log on to terminal servers.

Arguments

Input Arguments Required Description

<user>

Yes

The user name for which Terminal Services configuration settings are to be changed. If this is a SAM account name, the configuration is set on the specified server, and server parameter is required. If this is a distinguished name (DN) or an LDAP(Lightweight Directory Access Protocol) path, the configuration is set in Active Directory, and the preferredDomainController parameter is required.

<server>

No

The name of the terminal server on which settings are to be changed. This parameter is required if user is specified as a SAM account name. This parameter is ignored if user is specified as a DN or LDAP path. Note: In some configurations an error will occur if this parameter is specified as a fully-qualified name. Use the NetBIOS name instead to avoid the issue.

<preferredDomainController>

No

The name of the preferred domain controller on which Active Directory settings are to be changed. This parameter is required if user is specified as a DN or LDAP path. This parameter is ignored if user is specified as a SAM account name. Note: In some configurations an error will occur if this parameter is specified as a fully-qualified name. Use the NetBIOS name instead to avoid the issue.

Remarks

Security

If the inputs specify an Active Directory user, the caller must be a DomainAdmin, OrgCreator, or OrgAdmin. OrgCreators and OrgAdmins are allowed to change this setting only for users in their organizations.

If the inputs specify a local machine user, the caller must be a domain user who is an administrator of the specified server.

Sample Code

Example XML Request

<request> 
  <procedure> 
    <execute namespace="Managed Terminal Services" 
             procedure="TSDisableUser"> 
      <executeData> 
        <user>CN=Mary Customer,OU=Hosting,DC=Fabrikam,DC=com</user> 
        <preferredDomainController>dc1</preferredDomainController> 
      </executeData> 
    </execute> 
  </procedure> 
</request> 

Applies To

Terminal Services Namespace

See also

Tasks

Managed Terminal Services::TSEnableUser