共用方式為


從 商務用 Skype Online Connector 移轉到 Teams PowerShell 模組

Teams PowerShell 模組提供一組完整的 Cmdlet,可直接從 PowerShell 命令行管理 Teams。 系統管理員不需要商務用 Skype Online Connector 來管理 Teams。

備註

Teams 系統管理員在 2021 年 3 月 16 日 (MC244740 訊息中心張貼文章時收到通知;MC250940日期為 2021 年 4 月 16 日,) 此變更。

如何移轉

從使用 商務用 Skype Online Connector 移轉到 Teams PowerShell 模組很簡單。 下列步驟說明如何執行此移轉。

  1. 安裝最新的 Teams PowerShell 模組。 如需相關步驟,請 參閱安裝 teams PowerShell Microsoft

  2. 卸載商務用 Skype Online Connector。 若要卸載,請在 控制台 中移至 [程式和功能],選取 [商務用 Skype Online],Windows PowerShell [模組],然後選取 [卸載]

  3. 在 PowerShell 腳本中,變更參照 Import-Module 的模組名稱

    SkypeOnlineConnectorLyncOnlineConnectorMicrosoftTeams

    例如,變更 Import-Module -Name SkypeOnlineConnectorImport-Module -Name MicrosoftTeams

  4. 使用 Teams PowerShell 模組 2.0 或更新版本時,請更新參照New-CsOnlineSessionConnect-MicrosoftTeams的腳本。 Import-PsSession不再需要建立 商務用 Skype Online Remote PowerShell 會話。

       # 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
    

安裝 Microsoft Teams PowerShell

使用 Teams PowerShell 管理 Teams

Teams PowerShell 版本資訊

Microsoft Teams Cmdlet 参照

商務用 Skype Cmdlet 參照