终端服务主文件夹withDirectory服务反向查找

编程入门 行业动态 更新时间:2024-10-09 00:47:28
本文介绍了终端服务主文件夹withDirectory服务反向查找的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在寻找一种方法来查询用户对象的终端服务主文件夹属性在Active Directory中。我的目标是能够执行反向查找,找到用户(S)使用特定的主文件夹。

I'm looking for a way to query the Terminal Services Home Folder property of user objects in Active Directory. My goal is to be able to perform a reverse lookup, finding the user(s) that use a particular home folder.

通常情况下执行搜索,我会做这样的事情:

Normally to perform a search I would do something like this:

using (var search = new DirectorySearcher()) { // Find a user based on their telephone number search.Filter = "(telephoneNumber=999)"; search.PropertiesToLoad.Add("displayName"); var result = search.FindOne(); if(result != null) {....} }

但终端服务设置似乎并不有一个可供参考的LDAP属性的名称 - 在过去的设置的这些价值,我不得不使用IADsTSUserEx接口与现有的DirectoryEntry操纵TS配置文件和主文件夹属性。然而,当我的用户帐户有问题,这是唯一有用的 - 这是不是很实用步骤,通过每个用户的域,并创建一个DirectoryEntry对象对他们来说只是为了检查他们的TS配置文件路径

But the Terminal Services settings don't seem to have a referable LDAP attribute name - in the past to set these values I've had to use the IADsTSUserEx interface with an existing DirectoryEntry to manipulate the TS profile and home folder properties. However this is only useful when I have the user account in question - it's not very practical to step through every user in a domain and create a DirectoryEntry object for them just to check their TS profile path.

有没有执行在.NET中的WHERE User.TerminalServicesProfilePath = X查询任何实际的方法?

Is there any practical way to perform a "WHERE User.TerminalServicesProfilePath=X" query in .NET?

推荐答案

没人在这里,所以,我试着解释。

Nobody here so, I try an explanation.

在Windows Server 2008中(和R2),终端服务终端服务器运行时接口取自称为用户活动目录属性的用户参数 userParameters 。 作为微软文档用户参数包含的终端服务器参数作为BLOB 。

In Windows Server 2008 (and R2), the Terminal Services Terminal Server Runtime Interface takes the user parameters from the user Active-Directory attribute called userParameters. As explain in Microsoft documentation userParameter contains Terminal Server parameter as blob.

更多推荐

终端服务主文件夹withDirectory服务反向查找

本文发布于:2023-11-28 10:43:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1642073.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:主文   终端   withDirectory

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!