Need to insert value to msRTCSIP-PrimaryUserAddress

Hi,

I need to know how to insert (bulk) value to msRTCSIP-PrimaryUserAddress based on a CSV-file that has SamAccountName as key.

Thanks

February 6th, 2014 7:18am

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

Free Windows Admin Tool Kit Click here and download it now
February 6th, 2014 11:27am

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




February 6th, 2014 12:13pm

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.

Free Windows Admin Tool Kit Click here and download it now
February 6th, 2014 12:19pm

Thank you very much, it worked great.

  • Marked as answer by hanssonm 16 hours 30 minutes ago
February 6th, 2014 2:05pm

You're very welcome, glad it worked out.

Free Windows Admin Tool Kit Click here and download it now
February 6th, 2014 2:27pm

Thank you very much, it worked great.

  • Marked as answer by hanssonm Thursday, February 06, 2014 7:02 PM
February 6th, 2014 10:02pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics