0

I am looking to do a CSVDE import onto my server 2008 r2 DC. I have set up the csv correctly and can import users and have users added to the group from the import, all as expected. I then found that the master file from which my csv is included has a different naming scheme than the users in Active Directory.

This means that the list of CN's which are being used to add users to the group may or may not be the same - generally there is a missing middle name.

My question is this: is there a way to do the import, calling something I know is the same, for example the sAMAccountname without having to modify all the attributes of either the members of my AD or try and figure out which middle names have been deleted or not

or to put it another way:

DN,description,objectClass,sAMAccountName,mail,member "CN=Cheesecake Group,OU=Tech,OU=Staff,DC=khs,DC=edu",Distribution group for cheescake,group,Cheesecake Group,[email protected],"CN=Charlie Cheesecake,OU=Tech,OU=Staff,DC=khs,DC=edu"

Can the text in bold be replaced with something like

"sAMAccountname=12345,OU=Tech,OU=Staff,DC=khs,DC=edu"

2
  • 1
    No - that is not a valid distinguished name.
    – Greg Askew
    Oct 29, 2018 at 16:50
  • Right, but that's the point, can we use something other than the dn? Oct 29, 2018 at 17:53

1 Answer 1

0

Use Powershell or something to look up the correct distinguished names of the accounts for which you've currently got the sAMAccountName and replace those values in your CSVDE file.

Or, if all you're doing is adding members to a group, simply use Powershell to add them by their sAMAccountName.

Add-ADPrincipalGroupMembership -identity $samAccountName -memberof GroupName
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .