4 September 2013

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
}

No comments:

Post a Comment