Friday 7 October 2016

Backup and restore user data after failed move from Lync Server 2010 to Skype for Business Server 2015

A customer has moved some thousand of their users from Lync Server 2010 to a Skype for Business Server 2015 pool. Few of these users failed with the dreaded


Distributed Component Object Model (DCOM) operation SetMoveResourceData failed. For details see inner exception (which didn't show anything useful to me).

The failed users were caught in a limbo and unable to sign in again, to resolve this incident, the customer decided to move the user with -force parameter, which causes the user to loose all contact and conference data. Their support organization talked to the few users and helped them recreate their contacts.

Before moving more users, we needed to create a backup plan, especially as the next batch of users contains a number of CXO users, and it might not career-enhancing if they loose data.

To make a documented and tested backup and restore plan for these users, I went through the process.

User kme is homed on Lync 2010 pool and has a few contacts in the contact list.

First we use dbimpexp.exe tool to export all user data for this user (or all users for a batch of users, just exclude the /user: parameter - for 12k users, this might take up to 5 seconds)
DBImpExp.exe /user:user@sipdomain /hrxmlfile:<filename>.xml /sqlserver:<SQLFQDN>

 

 Then we move the user to the Skype for Business Server 2015 pool.
Get-CsUser user | Move-CsUser -Target <SkypePoolFQDN> -MoveConferenceData -Force


When the user has been moved, we see all the user data was lost.


Now we need to import the user data.
Update-CsUserData -FileName .\<filename>.xml -UserFilter user@sipdomain

When the user sign out and sign in, the user data has been restored.

In case of a major restore operation it would be more appropriate to use Import-CsUserData cmdlet. 

Import-CsUserData cmdlet overwrites any existing data and needs a restart of frontend service (RTCSRV) on all frontends in the pool to be effective. Use this in case of a vast user restore operation, with many users. When the parameter -LegacyFormat is included, a non-existing, cmdlet Convert-CsLegacyUserData is triggered. In case of legacy userdata (pre Lync 2013), the XML file must converted first using the Convert-CsUserData cmdlet. E.g. Convert-CsUserData- FileName .\kme.xml -OutputFile kme.zip -TargetVersion Current

Update-CsUserData cmdlet appends to the contact list (merges) and is a more resource demanding operation. This will be effective immediately. Use this in case of a limited user restore operation or in case some users needs to have merged the restored contact list.




Wednesday 5 October 2016

Change username when UPN and SIP URI are different

I just discussed how to change the username, when the UPN is different from the SIP URI. So I made this post to document my findings.

First sign out from the client (if applicable) and click "Delete My Sign-in Info" 


Confirm you really want to do this


Exit Skype for Business client application

Delete the sip_<username> folder, for Skype for Business 2016 it is in %userprofile%\appdata\Local\Microsoft\Office\16.0\Lync\. It is safe to delete the entire folder, it will be recreated at next logon.

Start Skype for Business client application again, enter password and press Sign In


Confirm you want to save the sign-in info
Oops (as expected)

Enter the UPN or Domain\SAMAccountName in the username field, password and click Sign In

Confirm you want to save the sign-in info

And the client signs in