Forum Discussion
Moving a User to Skype for Business Online
- Jan 29, 2018
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
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
- Habib MankalJan 29, 2018MVP
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
- blue-manJan 29, 2018Iron Contributor
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- blue-manJan 29, 2018Iron Contributor
actually found the issue I had a space in between - OverrideAdminDomain it should be
-OverrideAdminDomain
- blue-manJan 29, 2018Iron Contributor
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- blue-manJan 29, 2018Iron Contributor
Looks like it is a known issue for hybrid deployments - http://www.ucblog.co.uk/?p=25