How to edit only the Firstname (givenName) of multiple users and import with csv RRS feed

  • Question

  • Hello Powershell Masters!! I hope all is well this morning :)

    I was hoping the community would be able to help me. I looked all night at different scripts, but I was unable to find one for my specific need. If I have a list of users where the samAccountName for all the users are all numerical Example, 745744, 745746, etc…. I was looking for a powershell script that could accomplish the following:

    1. Put an “XX” without quotes in front of the users first name or givenname
    2. Have the script import the list of users from an csv file if I have a list of all the users samAccountName
    3. I don’t know how I would format the csv file…. Do I need only one column that says samAccountName?? How would we format the csv file?
    So if the users givenName is for example, JOAQUIN, I would need the first name to be XXJOAQUIN. I have about 500 users that I would have to do this for, and we are doing it manually right now, but I figured I would ask the people way smarter than me to see if it’s possible for powershell to do all the heavy lifting (i know nothing about powershell but am smart enough to ask for help). So the only thing that I need changed is adding the “XX” before the users givenNames….

    Thanks everyone in advance. You guys/gals are awesome!

    Thursday, July 26, 2018 3:17 PM


All replies