Rediģēt

Kopīgot, izmantojot


Migrating from Skype for Business Online Connector to the Teams PowerShell module

Teams PowerShell Module provides a complete set of cmdlets for managing Teams directly from the PowerShell command line. Administrators don't require Skype For Business Online Connector for their Teams administration.

Note

Teams administrator were notified through Message center post (MC244740, dated March 16, 2021; MC250940, dated April 16 2021) about this change.

How to Migrate

Migrating from using Skype for Business Online Connector to Teams PowerShell module is easy and simple. The below steps explain how to do this migration.

  1. Install the latest Teams PowerShell module. For steps, see Install Microsoft Teams PowerShell.

  2. Uninstall Skype For Business Online Connector. To uninstall, in Control Panel, go to Programs and Features, select Skype for Business Online, Windows PowerShell Module, and then select Uninstall.

  3. In your PowerShell scripts, change the module name that's referenced in Import-Module from

    SkypeOnlineConnector or LyncOnlineConnector to MicrosoftTeams.

    For example, change Import-Module -Name SkypeOnlineConnector to Import-Module -Name MicrosoftTeams.

  4. When using Teams PowerShell Module 2.0 or later, update your scripts that refers New-CsOnlineSession to Connect-MicrosoftTeams. Import-PsSession is no longer required to establish a Skype for Business Online Remote PowerShell Session.

       # When using the Skype for Business online connector
    
         # Establishing a session
         Import-Module SkypeOnlineConnector [LyncOnlineConnector]
         $credential = Get-Credential
         $SkypeSession = New-CsOnlineSession -Credential $credential
         Import-Session $SkypeSession
    
         # Example getting tenant details
         Get-csTenant
    
         # Disconnecting and closing the Session 
         Get-PsSession $SkypeSession | Remove-PsSession
    
       # When using Teams PowerShell Module 2.0 or later
    
         # Establishing a session
         Import-Module MicrosoftTeams
         $credential = Get-Credential
         Connect-MicrosoftTeams -Credential $credential
    
         # Example getting tenant details
         Get-csTenant
    
         # Disconnecting and closing the Session  
         Disconnect-MicrosoftTeams
    

Install Microsoft Teams PowerShell

Manage Teams with Teams PowerShell

Teams PowerShell release notes

Microsoft Teams cmdlet reference

Skype for Business cmdlet reference