I use the DLL "Interop.TSUSEREXLib.dll" to determine the terminalservices profilepath for an AD-Account. This worked so far without problems with Win7 as my client. The same code does not work with Windows 10.
Here is a short code example:
Imports TSUSEREXLib
Dim oTsUser As IADsTSUserEx = Nothing
oTsUser = TryCast(New DirectoryEntry(ADsPath).NativeObject, IADsTSUserEx)
If oTsUser Is Nothing Then
MessageBox.Show("Die Terminalservices-Attribute konnten nicht ermittelt werden!")
Return Nothing
End If
Dim sReturnValue As String = Nothing
sReturnValue = oTsUser.TerminalServicesProfilePath
Using Win10 the above MessageBox is always displayed.
Does anyone know a way to determine the TS attributes of an ActiveDirectory user with Windows 10 as client?
I use Win10 x64 with VS2015 Express. Thank you!
You can use the solution explained here: https://blog.cjwdev.co.uk/2014/08/24/vb-net-decode-ad-userparameters-attribute-values/
And on this site there is a complete code to encode and decode the userParameters including some explanation: https://00laboratories.com/resources/code/c-sharp/microsoft-active-directory-userparameters-header