sAMAccountName,physicalDeliveryOfficeName,streetAddress,state,postalCode,city,country,title,telephoneNumber,mobile\nuser1,Roma,Piazza San Pietro,Roma,12234,Roma,IT,Applications Engineer,+39 0123 111111,\nuser2,Roma,Piazza San Pietro,Roma,12234,Roma,IT,Specialist,+39 0123 222222,+39 555 7654321\n<\/code><\/pre>\n
when I import a user with all the fields populated this is imported correctly (for example the user user2 in the csv) while if I import a user who is missing a field, for example the user1 (the mobile field is missing) I get this error:<\/p>\n
Set-ADUser : replace \nin line 4 character 70<\/p>\n
I don’t understand how to fix the problem.<\/p>","upvoteCount":2,"answerCount":4,"datePublished":"2022-01-14T15:11:41.000Z","author":{"@type":"Person","name":"spiceuser-8ic3z","url":"https://community.spiceworks.com/u/spiceuser-8ic3z"},"suggestedAnswer":[{"@type":"Answer","text":"
Hey guys,<\/p>\n
i’m new to powershell … \nI created this script by merging some found on this site to massively import some data into my Active Directory<\/p>\n
sAMAccountName,physicalDeliveryOfficeName,streetAddress,state,postalCode,city,country,title,telephoneNumber,mobile\nuser1,Roma,Piazza San Pietro,Roma,12234,Roma,IT,Applications Engineer,+39 0123 111111,\nuser2,Roma,Piazza San Pietro,Roma,12234,Roma,IT,Specialist,+39 0123 222222,+39 555 7654321\n<\/code><\/pre>\n
when I import a user with all the fields populated this is imported correctly (for example the user user2 in the csv) while if I import a user who is missing a field, for example the user1 (the mobile field is missing) I get this error:<\/p>\n
Set-ADUser : replace \nin line 4 character 70<\/p>\n
I don’t understand how to fix the problem.<\/p>","upvoteCount":2,"datePublished":"2022-01-14T15:11:41.000Z","url":"https://community.spiceworks.com/t/set-aduser-replace-error/822097/1","author":{"@type":"Person","name":"spiceuser-8ic3z","url":"https://community.spiceworks.com/u/spiceuser-8ic3z"}},{"@type":"Answer","text":"