DirectoryServices
네임 스페이스를보고 있는데 광고의 모든 그룹 목록을 가져 와서 목록 상자에로드하려고합니다.Active Directory에 모든 그룹 및 그룹 구성원을 쿼리하는 방법?
그룹을 선택하면 해당 그룹에 할당 된 모든 사용자가 포함 된 다른 목록 상자와 관리자 이름이 포함 된 텍스트 상자를 채우고 싶습니다. 나는 그 과정에서 머리를 감싸는 데 어려움을 겪고있다. 누군가 나를 도울 수 있었습니까?
전체 예를 들어 보면 더 큰 그림을 더 잘 이해할 수있을 것이라고 확신합니다. 당신이 이미하지 않은 경우
// create your domain context
PrincipalContext ctx = new PrincipalContext(ContextType.Domain);
// define a "query-by-example" principal - here, we search for a GroupPrincipal
GroupPrincipal qbeGroup = new GroupPrincipal(ctx);
// create your principal searcher passing in the QBE principal
PrincipalSearcher srch = new PrincipalSearcher(qbeGroup);
// find all matches
foreach(var found in srch.FindAll())
{
GroupPrincipal foundGroup = found as GroupPrincipal;
if(foundGroup != null)
{
// do whatever you need to do, e.g. put name into a list of strings or something
}
}
: TIA
이 참조 자료를 보았습니까? : http://www.codeproject.com/Articles/18102/Howto-Almost-Everything-In-Active-Directory-via-C# – Dan
네,하지만 정확히 어떤 것인지 모르겠습니다. 내게 적용되거나 내 목표에 적용하는 방법 – Sinaesthetic