按组显示Active Directory中的用户详细信息 [英] Show user detail from Active Directory by group wise
问题描述
我想显示活动目录中的所有用户详细信息。
DirectoryEntry条目= new DirectoryEntry();
entry.Path =LDAP://domain.co.in;
DirectorySearcher mySearcher = new DirectorySearcher(entry);
string Name =amit_ghorpade;
mySearcher.Filter =((anr =+ Name +));
foreach(SearchResult结果)在mySearcher.FindAll())
{
//Response.Write(result.GetDirectoryEntry().Path);
Response.Write (result.GetDirectoryEntry()。Parent.Name);
Response.Write( );
响应。写(result.GetDirectoryEntry()。姓名);
Response.Write(
);
}
我已将此代码用于show user通过搜索工具。
但我希望通过单独的组显示用户详细信息。
即用户将提供组名和代码将返回该组下的所有用户。
提前致谢。
Hi,
I want to show all user detail from active directory.
DirectoryEntry entry = new DirectoryEntry();
entry.Path = "LDAP://domain.co.in";
DirectorySearcher mySearcher = new DirectorySearcher(entry);
string Name = "amit_ghorpade";
mySearcher.Filter = ("(anr=" + Name + ")");
foreach (SearchResult result in mySearcher.FindAll())
{
//Response.Write(result.GetDirectoryEntry().Path);
Response.Write(result.GetDirectoryEntry().Parent.Name);
Response.Write(" ");
Response.Write(result.GetDirectoryEntry().Name);
Response.Write("
");
}
I have used this code for show user by search facility.
but I want to show user detail by separate group.
i.e User will provide group name and code will return all user under this group.
Thanks in advance.
推荐答案
我希望特定组的用户列表即IT部门
执行此代码所需的更改内容和方式。
I want this user list by particular group i.e. IT department
What and how changes it will need to do this code.
这篇关于按组显示Active Directory中的用户详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!