N B
asked on
Importing spreadsheet to modify AD user properties
I need to import a spreadsheet containing phone number, fax number and telephone into our Active directory current objects for about 50 current users.
Do anyone have any script / help me how to attain this task through powershell ?
Thanks
Danny
Do anyone have any script / help me how to attain this task through powershell ?
Thanks
Danny
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No i got first and last name column in this spread sheet.
Currently I am using following AD powershell command one by one which is working ... but I need to find the sam name.
get-aduser dgalet | set-aduser -streetaddress "Suite 100, 16011–116 Ave NW" -postalcode "T5M 3Y1" -Fax "780.451.0393" -Office "780.452.7720" -State "AB" -City "Edmonton"
If i can somehow do this with a loop and just using firstname and last name column somehow that would be great.
Currently I am using following AD powershell command one by one which is working ... but I need to find the sam name.
get-aduser dgalet | set-aduser -streetaddress "Suite 100, 16011–116 Ave NW" -postalcode "T5M 3Y1" -Fax "780.451.0393" -Office "780.452.7720" -State "AB" -City "Edmonton"
If i can somehow do this with a loop and just using firstname and last name column somehow that would be great.
ASKER
Is there a way to execute above loop using first and last name column instead of sam name ? to be able to pick user where first name and last name matches ?
Sorry I have not really worked on loop commands before.
thanks
Sorry I have not really worked on loop commands before.
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much oBdA, that helped me out a lot!
Have a great day.
Have a great day.
It's easiest if the columns in the csv are named the same as the attributes in AD (or their equivalents in Set-ADUser).
As far as telephone numbers go, there is Fax, HomePhone, MobilePhone, OfficePhone.
Then it's just a matter of importing the csv and setting the AD properties.
So something like
Open in new window