I suck at Powershell. Just putting that out there. I need to update the following AD attributes in Powershell for a list of users from a csv file:<\/p>\n
Advertisement
Manager<\/p>\n
Job Title<\/p>\n
Office<\/p>\n
Employee ID<\/p>\n
Department<\/p>\n
I need to do this using their email address as the unique identity for each object. Can anyone provide a sample script and how my CSV should be formatted to accomplish this? If you need details, please let me know. Thanks!<\/p>","upvoteCount":2,"answerCount":13,"datePublished":"2021-12-09T15:18:43.000Z","author":{"@type":"Person","name":"spiceuser-m2lop","url":"https://community.spiceworks.com/u/spiceuser-m2lop"},"acceptedAnswer":{"@type":"Answer","text":"
what happens when you use ‘get-aduser’ instead?<\/p>\n
Get-ADuser $row.samaccountname\n<\/code><\/pre>\n
it by default looks in all OUs… so I’d double-check the samaccountname.<\/p>","upvoteCount":0,"datePublished":"2021-12-09T16:00:24.000Z","url":"https://community.spiceworks.com/t/update-ad-attributes-via-powershell/819256/11","author":{"@type":"Person","name":"Neally","url":"https://community.spiceworks.com/u/Neally"}},"suggestedAnswer":[{"@type":"Answer","text":"
Hello folks,<\/p>\n
I suck at Powershell. Just putting that out there. I need to update the following AD attributes in Powershell for a list of users from a csv file:<\/p>\n
Manager<\/p>\n
Job Title<\/p>\n
Office<\/p>\n
Employee ID<\/p>\n
Department<\/p>\n
I need to do this using their email address as the unique identity for each object. Can anyone provide a sample script and how my CSV should be formatted to accomplish this? If you need details, please let me know. Thanks!<\/p>","upvoteCount":2,"datePublished":"2021-12-09T15:18:44.000Z","url":"https://community.spiceworks.com/t/update-ad-attributes-via-powershell/819256/1","author":{"@type":"Person","name":"spiceuser-m2lop","url":"https://community.spiceworks.com/u/spiceuser-m2lop"}},{"@type":"Answer","text":"
Welcome.<\/p>\n
What have you tried? Where are you stuck<\/p>\n
In general you can use ‘set-aduser’ to update attributes, there are a bunch of build in ones.<\/p>\n