Lync: Change the sign-in address with PowerShell
If you started with Live Communications Server 2005, you may have used an internal namespace for sign-in and retained it through migrations to Office Communications Server 2007, Lync 2010 and Lync 2013. Using Lync Edge services to communicate externally can mean changing the sign-in address from @domain.local to @domain.com.
I recently followed this path and changed the sign-in addresses in my Lync pool to an external-facing domain. The following PowerShell script let me target a specific location first, so I could learn what problems the change would cause in my environment.
Change the Lync sign-in address
| |
Run the script from the Lync Command Shell. It targets a specific OU, stores its users in $LyncUsers and processes each user object. It reads SipAddress into $oldSIPAddress, replaces the domain to create $newSIPAddress and uses Set-CsUser to apply the change. Allow time for the Lync back end to update.
Update the client after the address change
Changing the server-side address was the easier part. The Lync client remembered ServerSipUri, so I added a logon script to delete that registry entry. The client could then retrieve the updated SipAddress and sign in.
| |
The migration initially went well, but users reported sign-in problems when they returned to the office on Monday. We had to enter the internal and external server addresses manually. I updated the logon script with our internal hostnames, which resolved the immediate problem. I am still investigating why internal discovery failed and hope to cover that in another post.
Resolve stale contact addresses
During testing, some users also saw "Presence Unknown" for contacts. Those contacts had been saved in Outlook with an IM address pointing to the old SipAddress. Deleting the old IM address, closing Outlook and Lync, and trying again resolved this issue for me.