Windows Dev Center

CanAccessLicenseServer method of the Win32_TerminalServiceSetting class

[CanAccessLicenseServer is no longer available for use as of Windows Server 2008 R2.]

Windows Server 2008:  

Determines whether the Remote Desktop Session Host (RD Session Host) server is allowed to request Remote Desktop Services client access licenses (RDS CALs) from a Remote Desktop license server based on the following:

  • The "license server security group" group policy setting on the Remote Desktop license server.
  • Membership in the Terminal Server Computers local group on the license server.

Syntax


uint32 CanAccessLicenseServer(
  [in]  string ServerName,
  [out] uint32 AccessAllowed
);

Parameters

ServerName [in]

The name of the Remote Desktop license server.

AccessAllowed [out]

Whether the RD Session Host server is allowed to request RDS CALs from the license server.

ValueMeaning
0

The request is allowed.

1

The request is not allowed.

 

Return value

Returns S_OK if the RD Session Host server has access to the license server. Returns S_FALSE if the RD Session Host server does not have access to the license server.

Remarks

The "license server security group" policy setting allows you to specify the RD Session Host servers that are permitted to contact the license server to obtain RDS CALs. If the policy setting is enabled on the license server, the license server will only respond to RDS CAL requests from RD Session Host servers whose computer accounts are members of the Terminal Server Computers local group on the license server.

To connect to the \root\CIMV2\TerminalServices namespace, the authentication level must include packet privacy. For C/C++ calls, this is an authentication level of RPC_C_AUTHN_LEVEL_PKT_PRIVACY. For Visual Basic and scripting calls, this is an authentication level of WbemAuthenticationLevelPktPrivacy or "pktPrivacy", with a value of 6. The following Visual Basic Scripting Edition (VBScript) example shows how to connect to a remote computer with packet privacy.


strComputer = "RemoteServer1" 
Set objServices = GetObject( _
    "winmgmts:{authenticationLevel=pktPrivacy}!Root/CIMv2/TerminalServices")


Managed Object Format (MOF) files contain the definitions for Windows Management Instrumentation (WMI) classes. MOF files are not installed as part of the Microsoft Windows Software Development Kit (SDK). They are installed on the server when you add the associated role by using the Server Manager. For more information about MOF files, see Managed Object Format (MOF).

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008

End of client support

None supported

End of server support

Windows Server 2008

Namespace

Root\CIMv2\TerminalServices

MOF

TsCfgWmi.mof

DLL

TsCfgWmi.dll

See also

Win32_TerminalServiceSetting

 

 

Show:
© 2015 Microsoft