I'm trying to create a user group named Maintenance_app
using vb.net.
The code is:
Dim dom As New DirectoryEntry()
Dim ou As DirectoryEntry = dom.Children.Find("")
Dim grp As DirectoryEntry = ou.Children.Add("Maintenance_app", "group")
grp.CommitChanges()
I receive the following error at the second line:
An unknown directory object was requested
What I'm doing wrong ?
If you want to work with Active Directory you need to understand the LDAP ADsPath.
In your case:
Or if you want the group on top level without an OU then just erase the 2nd line and change the 3rd line to:
As it seems that you are new to Active Directory here some Glossar:
Formula example:
Every single object in an Active Directory has its own exact DN.