Forum Discussion
Issue in script
https://ucstatus.com/2019/11/25/skypeonlineconnector-session-reconnection/amp/
Adam
- msabatJul 16, 2020Brass Contributor
adam deltinger I have that command in my script. And in simple loop script it works.
But I think issue is with
Connect-MsolService
I think that token expires in 1 hour
- RuudGijsbersJul 19, 2020Iron Contributor
Which command do you use for migrating the users to Teams? As of CU8 for SfB 2015 and SfB 2019, you can use the following command: Move-CsUser -Identity "someone@domain.com" -Target "sipfed.online.lync.com" -MoveToTeams -Credential $cred
That command doesn't need a connection to msolservice or Skype Online. Therefor you also won't run into the timing issue.
If you still need to use the Skype Online module, you could use something like this:
$StartDate = Get-Date foreach($user in $users){ $CurrentDate = Get-Date If ($CurrentDate -ge $StartDate.AddMinutes(45)){ $sfbSession = New-CsOnlineSession -Credential $cred Import-PSSession $sfbSession -AllowClobber -ErrorAction SilentlyContinue -WarningAction SilentlyContinue Enable-CsOnlineSessionForReconnection $StartDate = Get-Date } Grant-CsTeamsUpgradePolicy -identity $user.UPN -policyname UpgradeToTeams -confirm:$false }
To be on the safe side, it will reconnect 45 minutes after the first connection.
- msabatJul 20, 2020Brass Contributor
I use that:
Move-CsUser -Identity $user -Target sipfed.online.lync.com -HostedMigrationOverrideUrl https://admin0a.online.lync.com/HostedMigration/hostedmigrationservice.svc -ProxyPool sx-lyncpool.qg.com -MoveToTeams -BypassAudioConferencingCheck -BypassEnterpriseVoiceCheck -credential $credential -Verbose -Confirm:$false