SOLVED

Moving a User to Skype for Business Online

Iron Contributor

 

I am trying to move my account to Skype for Business Online, but I am getting the issue below:

 

From the Skype for business server management shell I run:


$cred=Get-Credential
Move-CsUser sip:firstname.lastname@domain.com -Target sipfed.online.lync.com -Credential $cred -HostedMigrationOverrideUrl https://name.online.lync.com/HostedMigration/hostedmigrationservice.svc

 

 

Rather than use the credentials that I am inputting after entering the $cred=Get-Credential command it is using my domain admin credentials (the credentials I am logged onto the server with).


Move-CsUser : Login failed for user 'domain\username'.
At line:1 char:1
+ Move-CsUser sip:firstname.lastname@domain.com -Target sipfed.online.lync.com
-Cre ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
+ CategoryInfo : NotSpecified: (:) [Move-CsUser], SqlConnectionEx
ception
+ FullyQualifiedErrorId : Microsoft.Rtc.Common.Data.SqlConnectionException
,Microsoft.Rtc.Management.AD.Cmdlets.MoveOcsUserCmdlet

15 Replies

Hi Craig ;

 

Not sure how you're connecting to your tenant but here is what I use:


1. Launch Powershell and connect to Skype for Business Online
Import-Module SkypeOnlineConnector
$credential = Get-Credential adminaccount@domain.com
$session = New-CsOnlineSession -Credential $credential
Import-PSSession $session -AllowClobber
Get-CsTenant | fl DisplayName
2. Example cmdlet: Move-CsUser -Identity User@domain.com -Target sipfed.online.lync.com -Credential $credential -HostedMigrationOverrideUrl https://adminXY.online.lync.com/HostedMigration/hostedmigrationservice.svc

What is the difference between sip: and -Identity?
best response confirmed by Habib Mankal (MVP)
Solution

Hi Craig;

 

Identity is a required parameter for moving a user, sip is the actual sip address of the user ie

 

Move-CsUser -Identity "sip:Habib@Domain.com" Target sipfed.online.lync.com -Credential $credential -HostedMigrationOverrideUrl https://adminXY.online.lync.com/HostedMigration/hostedmigrationservice.svc

 

Here is the documentation on the cmdlet.

https://docs.microsoft.com/en-us/powershell/module/skype/move-csuser?view=skype-ps

 

Habib

I get the following error after running - $session = New-CsOnlineSession -Credential $credential

 

Get-CsPowerShellEndpoint : The remote server returned an error: (406) Not
Acceptable.
At C:\Program Files\Common Files\Skype for Business
Online\Modules\SkypeOnlineConnector\SkypeOnlineConnectorStartup.psm1:107
char:26
+ $targetUri = Get-CsPowerShellEndpoint -TargetDomain $adminDomain
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-CsPowerShellEndpoint], We
bException
+ FullyQualifiedErrorId : System.Net.WebException,Microsoft.Rtc.Management
.OnlineConnector.GetPowerShellEndpointCmdlet

Looks like it is a known issue for hybrid deployments - http://www.ucblog.co.uk/?p=25

When I now run the command:

 

$session = New-CsOnlineSession -Credential $credential - OverrideAdminDomain “domain.onmicrosoft.com”

 

I get the following error:

 

New-CsOnlineSession : A positional parameter cannot be found that accepts
argument '-'.
At line:1 char:11
+ $session =New-CsOnlineSession -Credential $credential - OverrideAdminDomain
"dom ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
+ CategoryInfo : InvalidArgument: (:) [New-CsOnlineSession], Para
meterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,New-CsOnlineSession

Hi Craig,

 

You have a space between - and OverrideAdminDomain 

 

$session = New-CsOnlineSession -Credential $credential - OverrideAdminDomain “domain.onmicrosoft.com”

actually found the issue I had a space in between - OverrideAdminDomain it should be 

-OverrideAdminDomain 

The last command is still running as my domain admin account.

 

Move-CsUser -Identity sip:firstname.lastname@domain.com -Target sipfed.online.lync.com -Credential $credential -HostedMigrationOverrideUrl https://name.online.lync.com/HostedMigration/hostedmigrationservice.svc

 

Move-CsUser : Login failed for user 'domain\domainadminaccount'.
At line:1 char:1
+ Move-CsUser -Identity sip:firstname.lastname@domain.com -Target
sipfed.online.lyn ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
+ CategoryInfo : NotSpecified: (:) [Move-CsUser], SqlConnectionEx
ception
+ FullyQualifiedErrorId : Microsoft.Rtc.Common.Data.SqlConnectionException
,Microsoft.Rtc.Management.AD.Cmdlets.MoveOcsUserCmdlet

My domain admin account wasn't added to the CSAdministrator. i have added it to that group but now I am getting Move-CsUser : Cannot open database "xds" requested by the login. The login
failed.

Another group you need to be a member of is the RTCUniversalServerAdmins

http://communicationsknowledge.blogspot.co.uk/2014/10/enable-csuser-cannot-open-database-xds.html

Also ensure you are part of the RTCUniversalServerAdmins, RTCUniversalUserAdmins

If I point an on premise users to Skype for Business Online instead of moving them, what is the difference?

 

Enable-CsUser -Identity firstname.lastname@domain.com -SipAddress "sip:firstname.lastname@domain.com" -HostingProviderProxyFqdn "sipfed.online.lync.com"

 

Enable-CSUser is setting up a brand new user to have a sip address, policies etc to start using Skype for Business.

If you don't rely on your the conversation history and and your users can accept losing their contact list you can enable them as new users. Otherwise you should stick to migrating them.

1 best response

Accepted Solutions
best response confirmed by Habib Mankal (MVP)
Solution

Hi Craig;

 

Identity is a required parameter for moving a user, sip is the actual sip address of the user ie

 

Move-CsUser -Identity "sip:Habib@Domain.com" Target sipfed.online.lync.com -Credential $credential -HostedMigrationOverrideUrl https://adminXY.online.lync.com/HostedMigration/hostedmigrationservice.svc

 

Here is the documentation on the cmdlet.

https://docs.microsoft.com/en-us/powershell/module/skype/move-csuser?view=skype-ps

 

Habib

View solution in original post