J
Jason
I am trying to write code that creates groups in AD using the DirectoryEntry
object in .NET. (I used to be able to do this easily using VBScript...)
Anyways, the following code throws a VEY generic (and unhelpful) error
message. The most obvious reason is that I am not setting some required
property but I have no clue which property that may be. I cannot seem to
find any samples on how to manipulate groups (only on how to work with
users).
entry = New DirectoryEntry("LDAP://ou=MyGroups,dc=mydomain,dc=com")
group = entry.Children.Add("cn=test", "Group")
group.CommitChanges()
The exception thrown is "A constraint violation occurred".
Thanks,
Jason
object in .NET. (I used to be able to do this easily using VBScript...)
Anyways, the following code throws a VEY generic (and unhelpful) error
message. The most obvious reason is that I am not setting some required
property but I have no clue which property that may be. I cannot seem to
find any samples on how to manipulate groups (only on how to work with
users).
entry = New DirectoryEntry("LDAP://ou=MyGroups,dc=mydomain,dc=com")
group = entry.Children.Add("cn=test", "Group")
group.CommitChanges()
The exception thrown is "A constraint violation occurred".
Thanks,
Jason