Answered by:
moving bulk users from on premises to online

Question
-
I am looking a for script .
Reading users from a csv file and moving users from on premises Skype to online.
If anybody able to help me please
Than in Advance.
Regards
Ashraf
Ashraf
Wednesday, December 14, 2016 7:46 AM
Answers
-
Hi PT Ashraf,
Could you explain a little bit more what you need?
This is a very short PS command.
https://technet.microsoft.com/en-us/library/jj204969.aspx
Get-CsUser -Filter {UserProperty -eq "UserPropertyValue"} | Move-CsUser -Target sipfed.online.lync.com -Credential $creds -HostedMigrationOverrideUrl <URL>
regards Holger Technical Specialist UC
- Marked as answer by P T Ashraf Wednesday, December 14, 2016 8:06 AM
Wednesday, December 14, 2016 8:04 AM
All replies
-
Hi PT Ashraf,
Could you explain a little bit more what you need?
This is a very short PS command.
https://technet.microsoft.com/en-us/library/jj204969.aspx
Get-CsUser -Filter {UserProperty -eq "UserPropertyValue"} | Move-CsUser -Target sipfed.online.lync.com -Credential $creds -HostedMigrationOverrideUrl <URL>
regards Holger Technical Specialist UC
- Marked as answer by P T Ashraf Wednesday, December 14, 2016 8:06 AM
Wednesday, December 14, 2016 8:04 AM -
Hi Holger,
I have a csv file of 4000 users.
I need to move all 4000 users from onpremise to skpe online.
Thanks for your help
Ashraf
Wednesday, December 14, 2016 8:07 AM -
You can use the command above and change the PS file from this link
https://social.technet.microsoft.com/Forums/lync/en-US/4299d5b8-5acd-4609-8ab4-810ef68ce20e/enable-many-users?forum=lyncdeploy
regards Holger Technical Specialist UC
Wednesday, December 14, 2016 8:22 AM -
I am able to move users using below script.
$creds=Get-Credential
Import-Csv moving-to-cloud.csv -Header Identity | Foreach-Object {Move-CsUser -Identity $_.identity -Target sipfed.online.lync.com -Credential $creds -HostedMigrationOverrideUrl https://admin1e.online.lync.com/HostedMigration/hostedmigrationService.svc -confirm:$False}It is failing with strange error as below which I never got before.
Move-CsUser : Index was outside the bounds of the array.
At line:1 char:1
+ Move-CsUser -Identity shahbaz@kfupm.edu.sa -Target sipfed.online.lync.com
-Crede ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
+ CategoryInfo : InvalidOperation: (CN=SHAHBAZ ASLA...pm,DC=edu,D
C=sa:OCSADUser) [Move-CsUser], IndexOutOfRangeException
+ FullyQualifiedErrorId : MoveError,Microsoft.Rtc.Management.AD.Cmdlets.Mo
veOcsUserCmdletAshraf
Wednesday, December 14, 2016 12:24 PM -
I'm having the same issue. Did you get anywhere with it?
David Hood www.consilium-uk.com
Thursday, December 15, 2016 3:32 PM -
Hi Ashraf,
Welcome to our forum.
To this issue, we suggest you login SQL server and run “appwiz.cpl”, then click “Microsoft SQL Server 2012 Native Client > Repair”, check if the issue persist. You could refer to the following link:
If there are any questions or issues, please be free to let me know.
Best Regards,
Jim Xu
TechNet Community Support
Please remember to mark the replies as answers if they helped.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.Friday, December 16, 2016 9:05 AM -
kindly get this checked from o365 online team as well if all services are working fine or not sometimes issue comes from there side as well...
easy one is if you want to move all the users are
get-csuser | move cs-user
it will ask for target FQDN put your o365 fqdn sipfed.online.lync.com
Regards
Friday, December 16, 2016 10:55 AM -
Hi Ashraf,
we solved this by checking we had permissions to SQL. The account didnt have SQL admin permissions. We added that and we could move the users fine.
maybe you want to check that?
David Hood www.consilium-uk.com
Friday, December 16, 2016 12:06 PM -
Hi,
Have the CSV file with userAccounts to be moved to online. And have your powershell script like this.$list = Import-Csv "C:\yourcsv.csv"
$cred = get-credential <tenant admin>
foreach ($row in $list)
{Move-CsUser -Identity $row.Identity -Target sipfed.online.lync.com -Credential $cred - Confirm:$False
}
Saturday, April 1, 2017 12:23 AM -
Hi,
I got the same error. In my case nothing do with Sql Server. Below troubleshooting solves me.
1) First verify users to be moved have assigned online license or not. if not make sure user's are assigned license.
2) Make sure your users are proper while moving online.
3) Make sure you have proper -HostedMigrationOverrideUrl mentioned. [Mentioning wrongly this value also cause error], some times this attribute is optional. So you can skip in case if it works for you.4) Still if you have issues, you can move one user and see if it works. Try from both powershell and server control panel and then you may narrow down the issue.
Hope it helps.
Thanks,
Ravi
Saturday, April 1, 2017 12:28 AM -
Hi,
I got the same error. In my case nothing do with Sql Server. Below troubleshooting solves me.
1) First verify users to be moved have assigned online license or not. if not make sure user's are assigned license.
2) Make sure your users are proper while moving online.
3) Make sure you have proper -HostedMigrationOverrideUrl mentioned. [Mentioning wrongly this value also cause error], some times this attribute is optional. So you can skip in case if it works for you.4) Still if you have issues, you can move one user and see if it works. Try from both powershell and server control panel and then you may narrow down the issue.
Hope it helps.
Thanks,
Ravi
Saturday, April 1, 2017 1:30 AM -
I am really struggling with this problem too. I have followed these troubleshooting steps with no luck
1. Repaired SQL Native Client
2. Verified right MigrationOverrideURL
3. Verified permissions. The account I am using is both domain admin on-prem and synced Office365, set as Global Admin
4. ensured connectivity to the ports from the edge server.
5. Ensured correct autodiscoverURL
6. Ensured all Lync related AD attributes are being synced to Office365
7. Ensured E3 license is applied to user with Skype Online enabled.
Still this error persists.
PS C:\Users\domainadmin> Move-CsUser -Identity 'test1@domain.ca' -Target sipfed.online.lync.com -Credential $creds -HostedMigrationOverrideUrl https://admin1a.online.lync.com/HostedMigration/hostedmigrationservice.svc -Verbose -confirm:$False VERBOSE: CN=Test User1,OU=STUFF,DC=contoso,DC=local WARNING: Moving a user from the current version to an earlier version (or to a service version) can cause data loss. VERBOSE: CN=Test User1,OU=STUFF,DC=contoso,DC=local Move-CsUser : Index was outside the bounds of the array. At line:1 char:1 + Move-CsUser -Identity 'test1@domain.ca' -Target sipfed.online.lync.com -Cred ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ + CategoryInfo : NotSpecified: (:) [Move-CsUser], IndexOutOfRange Exception + FullyQualifiedErrorId : System.IndexOutOfRangeException,Microsoft.Rtc.Ma nagement.AD.Cmdlets.MoveOcsUserCmdlet
Thursday, November 16, 2017 10:28 PM