繁体   English   中英

从Active Directory获取配置文件路径和主文件夹

[英]Get Profile Path and Home Folder from Active Directory

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

这些值存储在UserParameters属性中,要获取它们,您可以在此处使用InvokeGet,例如,获取“远程服务配置文件”路径:

// 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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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