Change SIP domain for all users

It isn’t everyday that you come across this but since many make the mistake of using their AD Domain name as their SIP domain, it does certainly come up.

Just remember that you will already have added the new SIP domain to the topology, all certificates sorted etc.

# Collect all the users and store as a variable
$Users = Get-CsUser

#The foreach loop
#Edit the bold bits to match your requirements

foreach ($User in $Users)
{
   $oldSIPDomain = $User.SipAddress
   $newSIPDomain = $oldSIPDomain -replace “@oldsipdomain.com“, “@newsipdomain.com
   Set-CsUser -Identity $User.Identity -SipAddress $newAddress
}

About Paul Bloem

My name is Paul Bloem, and I am self-employed in New Zealand as an independent consultant. I have been working on enterprise voice solutions for over 30 years. My first 10 years were spent working for a Telco in South Africa (Telcom SA). This is where all the groundwork happened as I was exposed to just about every aspect of telecommunication you could imagine. I develop an interest in PBX technologies and eventually became the go-to guy. Next, I had a 10 year run at Siemens South Africa, most of my time there was as a Technical Trainer. During this time VoIP hit the world stage, I had the privilege of introducing VoIP both as H.323 and later SIP across the Siemens HiPath 4000 solution stack. In 2008 I immigrated to New Zealand with my newly attained MCSE, I was ready to go where no PBX Techie had gone before. I was employed to explore OCS 2007 and that was pretty much the beginning of the end for me. I have been working on OCS and Lync ever since. My current role focuses exclusively on Lync and associated technologies.. That includes pre-sales, consulting, architecture and design, training and support. I even get to play in the development space from time to time - focus on play ;-) I was nominated as a Microsoft VTSP for Lync early in 2013 and also awarded Microsoft's MVP award for Lync in 2014.
This entry was posted in Chande SIP Domain. Bookmark the permalink.

Leave a comment