Solved

Script help to modify AD Attribute msRTCSIP-PrimaryUserAddress’

Posted on 2013-01-16
10
5,426 Views
1 Endorsement
Last Modified: 2013-01-18
I'm looking for a way to modify the sip domain for several hundred users
AD Attribute = msRTCSIP-PrimaryUserAddress

I have 2 test accounts ready to test against.
Test.LCS01
Test.LCS02

Does anyone have a script that I can edit?
I would like to target all the members of one group (this is how I did the bulk enabling for LCS; pulls user's primary SMTP and these user's don't have the standard company primary SMTP.)
Group Name:
CN=Bulk LCS Enabling

Thanks
1
Comment
Question by:Admin_Stooge
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 40

Expert Comment

by:Subsun
ID: 38785029
Do you mind a PowerShell solution with Quest AD cmdlets? If yes. Do you want the SIP address as same as the primary SMTP address of user?
0
 
LVL 8

Expert Comment

by:piyushranusri
ID: 38786052
see this query
1. $sipimport = Import-Csv x:\Exchange\sip_addresses_for_contacts.csv
ForEach ($Contact in $sipimport)
{
 set-QADObject -identity $contact.Alias_Name -ObjectAttribute @{"msRTCSIP-PrimaryUserAddress"=$contact.sip}
}
Th


2. http://www.powershellcommunity.org/Forums/tabid/54/aft/6913/Default.aspxGP and apply it.


please share the output
0
 

Author Comment

by:Admin_Stooge
ID: 38787298
@piyushranusri

The Link you posted is bad
0
Office 365 Training for IT Pros

Learn how to provision Office 365 tenants, synchronize your on-premise Active Directory, and implement Single Sign-On.

 
LVL 40

Expert Comment

by:Subsun
ID: 38787337
@Admin_Stooge, IF you are OK with PowerShell script can you answer my question?
Do you want the SIP address as same as the primary SMTP address of user?
0
 

Author Comment

by:Admin_Stooge
ID: 38787364
The primary address for these users are different than normal users.

our standard sip company should be @company.com
These users have their primary smtp as @companyA.com @ companyB.com so their SIP was stamped as @companyA.com or @companyB.com
We need to change their SIP to @company.com
0
 
LVL 40

Expert Comment

by:Subsun
ID: 38787420
So do you have a list of this users and their SP address?  for example.. a .CSV in following format..
Name,Sip
User1,User1@companyB.com
User2,User2@companyA.com

Open in new window


or is it OK If we set it to users sAMAccountName@company.com

I am asking this because, we need to provide some logic to script to get/generate the sip address for the user.
0
 

Author Comment

by:Admin_Stooge
ID: 38787585
I have attached the file I have for the users that need to be changed.
Their new SIP domain needs to be @thermofisher.com
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 38792474
I presume users are already enabled for Lync and you just want to change the sip address.
For example If user subsun have a sip address of SIP:subsun@companyB.com and the script will change the sip address to SIP:subsun@thermofisher.com

GC C:\userlist.txt | % {
$user = get-qaduser $_ -includedproperties "msRTCSIP-PrimaryUserAddress" | 
 Select sAMAccountName,msRTCSIP-PrimaryUserAddress -ErrorAction SilentlyContinue
	If ($user){
	$NewSip = ($user."msRTCSIP-PrimaryUserAddress" -split "@" )[0] + "@thermofisher.com"
	 get-qaduser $user.sAMAccountName -includedproperties "msRTCSIP-PrimaryUserAddress" | 
	  set-qaduser -oa @{"msRTCSIP-PrimaryUserAddress" = $NewSip}
	}
	Else {
	Write-Host "Not able to find User $($_) in Activedirectory"
	}
}

Open in new window

Input file format.
Subsun
Admin
Stooge
HTom

Open in new window

0
 

Author Comment

by:Admin_Stooge
ID: 38792928
Thanks and last question (dumb one) but how do I run this script?
0
 
LVL 40

Expert Comment

by:Subsun
ID: 38792948
You can install Quest AD cmdlets on any computer which is connected to your domain, and run the script from ActiveRoles Management Shell for Active Directory console..
Quest AD cmdlets : http://www.quest.com/powershell/activeroles-server.aspx

Ref : Running Windows PowerShell Scripts
http://technet.microsoft.com/en-us/library/ee176949.aspx
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains the steps required to use the default Photos screensaver to display branding/corporate images
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question