using (DirectoryEntry myDE = new DirectoryEntry(LDAPPath, LDAPUsername, LDAPPassword)) { DirectoryEntries myEntries = myDE.Children; using (DirectoryEntry group = myEntries.Add("CN=" + Name, "group")) { group.Properties["sAMAccountName].Add(Name); group.Properties["groupType].Add("-2147483644"); //DOMAIN LOCAL GROUP group.CommitChanges(); } }
Specialising in all things .NET, Brad has experience in a range of technologies including Microsoft ASP.NET, AJAX, SQL Server & EPiServer CMS to name but a few...