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,cheesecake@kloofhigh.co.za,"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"

1 Answers1

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
LeeM
  • 1,388
  • 9
  • 14