C
Chris H
I'm trying to query the terminal servies profile path using VB.Net 2005
for a user in our domain. I've successfully retrieved the user's
details, however, this particular attribute eludes me.
In Visual Basic I used the following method:
Set objUser = GetObject("LDAP://max.com/OU=username,...")
debug.print objUser.terminalservicesprofilepath
However, I'm trying to avoid the use of GetObject since I don't believe
it will be thread safe if I do so. The code I'm using so far in VB.NET
is:
Dim entry As DirectoryServices.DirectoryEntry
Dim searcher As System.DirectoryServices.DirectorySearcher
Dim result As System.DirectoryServices.SearchResult
entry = New
DirectoryServices.DirectoryEntry("LDAP://max.com/OU=username,..")
searcher = New
System.DirectoryServices.DirectorySearcher(entry)
searcher.PropertiesToLoad.Add("samAccountName")
This works to retrieve values however, trying to retrieve the terminal
services path seems to be impossible. Anyone have anyone suggestions?
for a user in our domain. I've successfully retrieved the user's
details, however, this particular attribute eludes me.
In Visual Basic I used the following method:
Set objUser = GetObject("LDAP://max.com/OU=username,...")
debug.print objUser.terminalservicesprofilepath
However, I'm trying to avoid the use of GetObject since I don't believe
it will be thread safe if I do so. The code I'm using so far in VB.NET
is:
Dim entry As DirectoryServices.DirectoryEntry
Dim searcher As System.DirectoryServices.DirectorySearcher
Dim result As System.DirectoryServices.SearchResult
entry = New
DirectoryServices.DirectoryEntry("LDAP://max.com/OU=username,..")
searcher = New
System.DirectoryServices.DirectorySearcher(entry)
searcher.PropertiesToLoad.Add("samAccountName")
This works to retrieve values however, trying to retrieve the terminal
services path seems to be impossible. Anyone have anyone suggestions?