You try to use the Active Directory Service Interfaces (ADSI) extension for Terminal Services to read the properties for a user on a Windows Server 2008-based computer. Then, you may receive an error message that resembles the following:
Error: The directory property cannot be found in the cache.
Source: Active Directory
This error can occur when you run Microsoft Visual Basic Scripting Edition (VBScript) code. For example, the error can occur when you run the following sample code.
Set objUser = GetObject("LDAP://cn=<user name>,cn=<ou>,dc=<test1>,dc=<test2>,dc=local")
Wscript.Echo objUser.Name & "Terminal Services Profile Settings"
WScript.Echo "Allow Logon:" & objUser.AllowLogon
This problem can occur if the properties for the user have not been set.
To resolve this problem, set the properties for the user. For example, use the Active Directory Users and Computers snap-in to set the Deny this user permissions to log on to Terminal Server
option in the properties for the user. To do this, follow these steps:
- Click Start, type dsa.msc in the Start Search box, and then click dsa in the Programs list.
If you are prompted for an administrator password or for a confirmation, type the password, or click Continue.
Collapse this imageExpand this image
- In Active Directory Users and Computers, click Users.
- Right-click the user, and then click Properties.
- On the Terminal Services Profile tab, click Deny this user permissions to log on to Terminal Server, and then click OK.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
For more information about how to use the ADSI extension for Terminal Services user configuration, visit the following Microsoft MSDN Web site: