简体   繁体   中英

Get Profile Path and Home Folder from Active Directory

我正在使用C#,并且能够从Active Directory中读取很多值,但是我不知道如何读取在远程桌面服务上都可以找到的配置文件路径或远程桌面服务主文件夹在Active Directory中查看用户时的“配置文件”选项卡。

These values store in UserParameters attribute and to get them you can to use InvokeGet here, for example to get Remote Service Profile path:

// Get Directory Entry for the object
DirectoryEntry de = New DirectoryEntry(ldapPath, logonName, password);
object prPAth = de.InvokeGet("TerminalServicesProfilePath"); // Remote Desktop Services profile path. If value is empty you'll get an exception here
object homeFolder = de.InvokeGet("TerminalServicesHomeDirectory"); // Remote Desktop Services home folder

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM