使用 PowerShell 管理 Skype for Business OnlineManage Skype for Business Online with PowerShell

本文适用于 Microsoft 365 企业版和 Office 365 企业版。This article applies to both Microsoft 365 Enterprise and Office 365 Enterprise.

Skype for Business Online 管理员负责管理策略。Skype for Business Online administrators are responsible for managing policies. 虽然你可以在 Microsoft 365 管理中心中执行其中一些任务,但在 PowerShell 中执行其他任务更容易。Although you can do some of these tasks in the Microsoft 365 admin center, others are easier to do in PowerShell.

准备工作Before you start

备注

Skype for Business Online 连接器目前是最新 Teams PowerShell 模块的一部分。Skype for Business Online Connector is currently part of the latest Teams PowerShell module. 如果你使用的是最新 Teams PowerShell 公共版本,则无需安装 Skype for Business Online 连接器。If you're using the latest Teams PowerShell public release, you don't need to install the Skype for Business Online Connector.

安装 Teams PowerShell 模块Install the Teams PowerShell module.

使用管理员凭据连接Connect using admin credentials

  1. 打开 Windows PowerShell 命令提示符窗口并运行以下命令:Open a Windows PowerShell command prompt window and run the following commands:

    Import-Module MicrosoftTeams
    $userCredential = Get-Credential
    Connect-MicrosoftTeams -Credential $userCredential
    
  2. 在 “Windows PowerShell 凭据请求”对话框中,键入你的 管理员帐户名和密码,然后选择“确定”。In the Windows PowerShell Credential Request dialog box, type your administrator account name and password, and then select OK.

使用具有多重身份验证的管理员帐户进行连接Connect using an admin account with multi-factor authentication

  1. 打开 Windows PowerShell 命令提示符窗口并运行以下命令:Open a Windows PowerShell command prompt window, and run the following commands:

    Import-Module MicrosoftTeams
    Connect-MicrosoftTeams
    
  2. 系统提示时,输入 Skype for Business Online 管理员帐户名称。When prompted enter your Skype for Business Online administrator account name.

  3. 在“登录到你的帐户”对话框中,键入你的 Skype for Business Online 管理员密码,然后选择“登录”。In the Sign in to your account dialog box, type your Skype for Business Online administrator password and select Sign in.

  4. 在“登录到你的帐户”对话框中,按照说明添加身份验证信息(如验证码),然后选择“验证”。In the Sign in to your account dialog box, follow the instructions to add authentication information, such as a verification code, and then select Verify.

有关详细信息,请参阅:For more information, see:

另请参阅See also

使用 PowerShell 管理 Microsoft 365Manage Microsoft 365 with PowerShell

PowerShell for Microsoft 365 入门Get started with PowerShell for Microsoft 365

Skype for Business PowerShell cmdlet 参考Skype for Business PowerShell cmdlet references