Solved

Script help to modify AD Attribute msRTCSIP-PrimaryUserAddress’

Posted on 2013-01-16
10
5,179 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
  • 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Synchronize a new Active Directory domain with an existing Office 365 tenant
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

786 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