If you started with Live Communications Server 2005 server you probably used an internal namespace for signing in. In the following migrations to Office Communications Server 2007, Lync 2010 and Lync 2013 you kept them smooth and didn’t change the sign-in address of your users. At some point your reached a moment where you want your users to use Lync Edge services and start communicating with external world and now you need to change from @domain.local to @domain.com.
This path I recently followed where I wanted to migrate sign-in addresses of my Lync pool to an external facing domain name. With help of following PowerShell script I was able to quickly change the sign-in address. I also wanted to target a specific location so I could learn what problems I would encounter when making this change in my enterprise environment.
How to change sign-in Lync address?
$LyncUsers = Get-CsUser -OU "OU=Rotterdam,OU=Users,dc=Networknet,dc=Local" foreach ($User in $LyncUsers) { $oldSIPAddress = $User.SipAddress $newSIPAddress = $oldSIPAddress -replace "@networknet.local", "@networknet.nl" Set-CsUser -Identity $User.Identity -SipAddress $newSIPAddress }
Running this PowerShell script from Lync Command Shell it will target a specific OU, put all users into a $LyncUsers array and go through each user object. With $oldSIPAddress I am getting the SipAddress and replacing the SipAdrress with $newSIPAddress. Final command is to run Set-CsUser to update the SipAddress of the users. Make sure to wait for a moment until Lync Back-end is updated.
This was the easiest part of the migration. As Lync client remembers the ServerSipUri (SipAddress) I needed to implement a logon script to delete this registry entry. After it has been deleted Lync client would pull again the SipAddress and be able to sign in.
Logon script after Lync sign-in change
@echo off If not exist %TMP%\%USERNAME%_LyncSign-in.txt GoTo Lync2013 Goto End :Lync2013 taskkill /im lync.exe reg delete HKCU\Software\Microsoft\Office\15.0\Lync /v ServerSipUri /f Echo Lync ServerSipUri deleted.>%TMP%\%USERNAME%_LyncSign-in.txt :End
Initially the migration went fine until users started to come in the office on Monday morning. Soon tickets come in that they couldn’t sign-in and that we manually needed to enter the internal and external server addresses. I quickly updated my login script and added the hostnames we used internally. This fixed the issue and I am still researching why internal discovery process is not working. I hope soon find the problem and be able to post it in another post.
One other issue that we encountered after changing the sign-in address is that for some users their status in Lync would say “Presence Unknown”. This was seen during our testing period and the issue was that users saved that specific user into their Outlook contacts. When you open that Outlook contact and look for IM address you will see that it points to the old SipAddress. Delete the IM address, close Outlook and Lync and try again. This solved for me this issue.
Leave a comment