Hi,
I need to know how to insert (bulk) value to msRTCSIP-PrimaryUserAddress based on a CSV-file that has SamAccountName as key.
Thanks
Technology Tips and News
Hi,
I need to know how to insert (bulk) value to msRTCSIP-PrimaryUserAddress based on a CSV-file that has SamAccountName as key.
Thanks
Hi,
This is a pretty vague question, but I'd start with something like this:
Import-Csv .\userList.csv | ForEach {
Set-ADUser -Identity $_.SamAccountNAme -Add @{'msRTCSIP-PrimaryUserAddress' = WhateverGoesHere}
}
Set-ADUser syntax: http://technet.microsoft.com/en-us/library/ee617215.aspx
Hi,
Thanks for your answer. I will try to clarify what I am trying to accomplish (PowerShell is new to me)
Today msRTCSIP-PrimaryUserAddress has no information, so I have exported all users and made a csv-file with only two values like bellow. My goal is to import value msRTCSIP-PrimaryUserAddress based on SamAccountName according to bellow.
SamAccountName,msRTCSIP-PrimaryUserAddress
USERA,user.a@company.com
USERB,user.b@company.com
USERC,user.c@company.com
etc
Okay, give this a try with a small testing group:
Import-Csv .\userList.csv | ForEach {
Set-ADUser -Identity $_.SamAccountNAme -Add @{'msRTCSIP-PrimaryUserAddress' = $_.'msRTCSIP-PrimaryUserAddress'}
}
This reads in your CSV file and then uses Set-ADUser on each entry in the file. I've never tried to set this property myself, so I can't guarantee that this will work on the first try.
Thank you very much, it worked great.
You're very welcome, glad it worked out.
Thank you very much, it worked great.