Skype for business powershell

Anil Kumar 6 Reputation points
2020-10-28T05:32:01.88+00:00

Exception is thrown while trying to connect to skype for business

Import-Module SkypeOnlineConnector
$sfbSession = New-CsOnlineSession -Credential $credentials
Import-PSSession $sfbSession
The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: [admin2a.online.lync.com]
Processing data from remote server admin2a.online.lync.com failed with the following error message:
One or more errors occurred. For more information, see the about_Remote_Troubleshooting Help topic.

Import-Module SkypeOnlineConnector
$sfbSession = New-CsOnlineSession -Credential $credentials
New-PSSession : [admin2a.online.lync.com] Processing data from remote server admin2a.online.lync.com failed with the
following error message: One or more errors occurred. For more information, see the about_Remote_Troubleshooting Help
topic.
At C:\Program Files\Common Files\Skype for Business
Online\Modules\SkypeOnlineConnector\SkypeOnlineConnectorStartup.psm1:254 char:16

  • ... $session = New-PSSession -Name $psSessionName -ConnectionUri $Connec ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
    gTransportException
  • FullyQualifiedErrorId : IncorrectProtocolVersion,PSSessionOpenFailed
Microsoft 365 and Office Skype for Business Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sharon Zhao-MSFT 25,756 Reputation points Microsoft External Staff
    2020-10-28T09:14:29.117+00:00

    @Anil Kumar ,

    Do you enter the administrator’s credential?

    Skype for Business Online Connector is currently part of the latest Teams PowerShell module. You could try to connect Teams PowerShell module as below and check the result:

    Import-Module MicrosoftTeams  
    $sfbSession = New-CsOnlineSession  
    Import-PSSession $sfbSession  
    

    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Anil Kumar 6 Reputation points
    2020-11-03T12:06:44.067+00:00

    Yes. it is resolved by adding -OverrideAdminDomain tenant.onmicrosoft.com.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.