예제 #1
0
        public static void GetAllGroups()
        {
            Domain domain = Domain.GetCurrentDomain();
            var    d      = new ADDomain(domain.Name.ToString());

            foreach (ADGroup g in d.GetAllGroups())
            {
                Console.WriteLine($"{g.GroupName}, {g.DistinguishedName}");
            }
        }