Solved

Script help to modify AD Attribute msRTCSIP-PrimaryUserAddress’

Posted on 2013-01-16
10
5,578 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

717 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