salam,
i 'm working on project adding users to MS Active directory.
i need to add bulk user to the active directory from file (csv, excel) using :
public static DirectoryEntry CreateNewUser(string cn)
{
string LDAPDomain ="/CN=Users," + GetLDAPDomain();
DirectoryEntry oDE= GetDirectoryObject(LDAPDomain);
DirectoryEntry user = oDE.Children.Add("CN=" + cn, "user");
user.CommitChanges();
oDE.Close();
oDE.Dispose();
return user;
}
I add user one by one, i want to to read the File and excute the command line be line
thanks,