Environment:
Office Communications Server 2007R2 to Lync Server 2013 Migration
Servers: Office Communications Server 2007 R2 (OCS2007R2), Lync Server 2013 (will be upgraded to Skype for Business Server when OCS2007R2 is decommissioned)
Issue:
The Lync Server 2013 had been setup, and the OCS2007R2 configuration has been merged with the topology.
Our next step was to move a user from OCS2007R2 to Lync Server 2013 we tried using Lync Server 2013 Control Panel and also Lync Server 2013 Management Shell same issue both times.
Move-CSLegacyUser -identity UserA -Target LyncPool.domain.ca resulted with the error:
Move-CSLegacyUser : Object not set to an instance of an Object
So one would think that since the migration failed that the user could still sign into OCS2007R2, well we thought wrong! When the user signs into OCS2007R2 they receive an error:
Cannot sign in because the server is temporarily unavailable. If the problem persists, contact your system administrator.
So we now we’re stuck , can’t sign into OCS2007R2 or Lync Server 2013.
Resolution:
Here is what was done in order to sign back into OCS2007R2 and then migrate the user over to Lync Server 2013.
We need to modify the Users AD Attributes so ensure you have the proper permissions.
- Remote Desktop to Domain controller or your Lync Server 2013
- Open up Active Directory Users and Computers
- Click View -> Advanced Features
- Find the user you tried to move over, and bring up their properties
- Select Attribute Editor Tab and scroll down to MSRTCSIP-PrimaryHomeServer
- Validate that this is still the OCS2007R2 server if not, find a user currently on OCS2007R2 and copy the details from there.
- Scroll down to MSRTCSIP-TargetHomeServer and MSRTCSIP-TargetUserPolicies and clear each entry
Now we need to fix the user on OCS2007R2
- Remote Desktop to the OCS2007R2 server
- Opened SQL Management Studio and connected to the SQLExpress
- First we need to find the ResourceId of UserA
- Start a new Query:
- Use RTC
- select * from dbo.Resource where UserAtHost = ‘UserA@domain.ca’
- Make not of the ResourceId
- Now we need to find out the row UserA’s configuration is setup with
- Start a new Query:
- Use RTC
- Select * from HomedResource where ResourceId = <ID Number from step 4>
- It returned:
- The MovingAway and Unavailable values were set to 1
- Changed the values from 0 to 1
- The user was now able to sign into OCS2007R2
Ok so now that we got the user back to where they were here is how we got them over to Lync Server 2013
- First we have to backup the users contact list on OCS2007R2
- Single User:
- Open a command prompt as administrator
- Browse to C:\Program Files\Common Files\Office Communications Server 2007 R2\Support
- Type the following command: dbimpexp.exe /user:<Sip Address> /hrxmlfile:”<FilePath>:\Username.xml”
- All Users:
- Open a command prompt as administrator
- Browse to C:\Program Files\Common Files\Office Communications Server 2007 R2\Support
- Type the following command: dbimpexp.exe /hrxmlfile:”<FilePath>:\AllUsers.xml”
- Single User:
- Move the User from OCS2007R2 to Lync Server 2013 (by forcing the user to move this will clear the contact list of the user)
- Open Lync Server 2013 Management Shell as administrator
- Type the following command: Move-CsLegacyUser -Identity “Username” -Target “Domain.ca” –ExcludeConferencingPolicy –ExcludeExternalAccessPolicy – Force
- Now we have to convert the xml file to a useable Lync Server 2013 format
- Single User:
- Copy the XML file to c:\Temp or another location on the Lync Server 2013
- Open Lync Server 2013 Management Shell as administrator
- Browse to C:\temp or the location the file was copied
- Type the following command: Convert-CsUserData -InputFile .Username.xml -OutputFile .Username.zip -TargetVersion current
- All Users:
- Copy the XML file to c:\Temp or another location on the Lync Server 2013
- Open Lync Server 2013 Management Shell as administrator
- Browse to C:\temp or the location the file was copied
- Type the following command: Convert-CsUserData -InputFile .Allusers.xml -OutputFile .AllUsers.zip -TargetVersion current
- Single User:
- Now we need to update the user with their contact list
- Single User:
- Open Lync Server 2013 Management Shell as administrator
- Type the following command: Update-CsUserData -Filename “C:\Temp\Username.zip” -UserFilter “<Sip Address>”
- Once command has completed , validate the user now has their contact list
- All Users:
- Open Lync Server 2013 Management Shell as administrator
- Type the following command: Update-CsUserData -Filename “C:\Temp\AllUsers.zip”
- Once the command has completed , validate the users now have their contact list
- Single User:
Now we can force move the user from OCS2007R2 to Lync Server 2013 and import their contact list.
Move-CsLegacyUser -Identity UserA@domain.ca -Target Lyncpool.domain.ca -ExcludeConferencingPolicy -ExcludeExternalAccessPolicy -Verbose -force -Confirm:$false
Update-CsUserData -FileName “C:\SfB\ExportedXML\AllUsers3.zip” -UserFilter UserA@Domain.ca -Confirm:$false
Thanks for the information, I have run into the same issue. Do you have any insight on what the cause of the “Object not set to an instance of an Object” error is?
Hey Jeff, I was not able to get down to the root cause unfortunately and just had to perform the work around.
Hi Hab,
I’ve got the same problem since the April 2016 CU was installed:
https://social.technet.microsoft.com/Forums/office/en-US/ef18d2c1-b619-40f2-860c-45186a1777c3/movecslegacyuser-object-not-set-to-an-instance-of-an-object?forum=lyncdeploy#ef18d2c1-b619-40f2-860c-45186a1777c3
Regards,
Garry
I was seeing the same issue after we applied Aug 2016 Rollup updates. Tried multiple things but nothing helped. then tried using -force with move-cslegacyuser and it worked.
Hi,
thanks for the help on this matter, I ran into this issue a few weeks ago and this workaround is helping me in the migration process.
I had a question. I already migrated some users for testing to the Lync 2013 environment.
Once I am confident to move all the rest, will the procedure to move all users will affect the current users that are already there?
Thank you!
It will only move them from the ocs pool to Lync