向用户分配团队附加许可证Assign Teams add-on licenses to users

加载项许可证是特定团队功能(如音频会议、电话系统和通话计划)的许可证。Add-on licenses are licenses for specific Teams features such as Audio Conferencing, Phone System, and Calling Plans. 本文介绍如何将加载项许可证分配给单个用户以及批量用户的大型用户组。This article describes how to assign add-on licenses to individual users and to large sets of users in bulk.

备注

请参阅适用于使用加载项许可证的团队功能的 团队加载项许可See Teams add-on licensing for Teams features that are available with add-on licenses. 你还可以找到有关你需要购买哪些许可证以及如何购买这些许可证的信息 (,具体取决于你的计划) ,以便用户可以获得音频会议、免费电话号码等功能,以及呼叫组织外部电话号码的功能。You'll also find information about what licenses you need to buy and how to buy them (depending on your plan), so users can get features such as Audio Conferencing, toll-free numbers, and the ability to call phone numbers outside your organization. 确定所需的用户功能后,为他们分配许可证。After you decide which features you want for your users, assign the licenses to them.

你可以使用 Microsoft 365 管理中心或 PowerShell 将许可证分配给你的组织中的用户。You can use the Microsoft 365 admin center or PowerShell to assign licenses to users in your organization. 您必须是全局管理员或用户管理管理员才能管理许可证。You must be a Global admin or User management admin to manage licenses.

在分配电话系统、呼叫计划和通讯信用许可证之前需要了解的内容What you need to know before you assign Phone System, Calling Plan, and Communication Credits licenses

开始之前,请查看以下内容:Before you get started, review the following:

  • 如果您使用的是本地公共交换电话网络 (PSTN) 混合用户的连接,则只需分配电话系统许可证。If you're using on-premises Public Switched Telephone Network (PSTN) connectivity for hybrid users, you only need to assign a Phone System license. 不要分配呼叫计划许可证。Do NOT assign a Calling Plan license.

  • 由于 Microsoft 365 和 Microsoft 团队之间的延迟,在分配许可证后,可能需要长达24小时才能向用户分配呼叫计划。Because of the latency between Microsoft 365 and Microsoft Teams, it can take up to 24 hours for a user to be assigned a Calling Plan after you assign a license. 如果在24小时后未向用户分配呼叫计划, 请联系业务产品支持-管理员帮助If the user isn't assigned a Calling Plan after 24 hours, contact support for business products - admin help.

  • 如果尚未购买正确数量的许可证,您将收到一条错误消息。You'll get an error message if you haven't purchased the correct number of licenses. 如果您需要购买更多通话计划许可证,请选择购买更多电话的选项。If you need to buy more Calling Plan licenses, choose the option to buy more.

  • 即使你的用户已分配有企业版 E5 许可证,你仍然需要将 信用点数 许可证分配给他们,前提是他们需要从 PSTN 发出或接收呼叫。Even if your users are assigned Enterprise E5 licenses, you still need to assign Communications Credits licenses to them if they want make or receive calls from the PSTN.

  • 向用户分配呼叫计划或通讯信用许可证后,您需要为您的组织获取电话号码,然后将这些号码分配给用户。After you assign Calling Plan or Communication Credits licenses to your users, you'll need to get phone numbers for your organization, and then assign those numbers to users. 有关分步说明,请参阅 设置呼叫计划For step-by-step instructions, see Set up Calling Plans.

使用 Microsoft 365 管理中心Using the Microsoft 365 admin center

使用 Microsoft 365 管理中心将许可证分配给单个用户或一次一组小型用户。Use the Microsoft 365 admin center to assign licenses to individual users or small sets of users at a time. 你可以在 " 许可证 " 页面上为最多20个用户 (分配许可证) 或 " 活动用户 " 页面。You can assign licenses on the Licenses page (for up to 20 users at a time) or the Active users page. 你选择的方法取决于你是要为特定用户管理产品许可证还是管理特定产品的用户许可证。The method you choose depends on whether you want to manage product licenses for specific users or manage user licenses for specific products.

有关分步说明,请参阅 向用户分配许可证For step-by-step instructions, see Assign licenses to users.

如果需要为大量用户(如成百上千用户)分配许可证,请 在 Azure Active Directory 中使用基于 Powershell 或基于组的许可 (AZURE AD) If you need to assign licenses for a large number of users, such as hundreds or thousands of users, use Powershell or group-based licensing in Azure Active Directory (Azure AD).

使用 PowerShellUsing PowerShell

使用 PowerShell 批量向用户分配许可证。Use PowerShell to assign licenses to users in bulk. 若要了解详细信息,请参阅 使用 PowerShell 向用户帐户分配许可证To learn more, see Assign licenses to user accounts with PowerShell.

示例脚本Example script

下面是如何使用脚本向用户分配许可证的示例。Here's an example of how to use a script to assign licenses to your users.

  1. 为 IT 专业人士 RTW 安装64位版本的 Microsoft Online Services 登录助手Install the 64-bit version of the Microsoft Online Services Sign-in Assistant for IT Professionals RTW.

  2. 安装适用于 Windows PowerShell 的 Microsoft Azure Active Directory 模块:Install the Microsoft Azure Active Directory Module for Windows PowerShell:

    1. 打开提升了权限的 Windows PowerShell 命令提示符 (以管理员身份) 运行 Windows PowerShell。Open an elevated Windows PowerShell command prompt (run Windows PowerShell as an admin).
    2. 运行以下命令:Run the following command:
      Install-Module MSOnline
      
    3. 如果系统提示您安装 NuGet 提供程序,请键入 " Y",然后按 Enter。If you're prompted to install the NuGet provider, type Y, and then press Enter.
    4. 如果系统提示您从 PSGallery 安装模块,请键入 Y,然后按 Enter。If you're prompted to install the module from PSGallery, type Y, and then press Enter.
  3. 在 Windows PowerShell 命令提示符处,运行以下脚本以向你的用户分配许可证,其中 <CompanyName:License> 是你的组织名称和要分配的许可证的标识符。At the Windows PowerShell command prompt, run the following script to assign licenses to your users, where <CompanyName:License> is your organization name and the identifier for the license that you want to assign. 例如,litwareinc: MCOMEETADV。For example, litwareinc:MCOMEETADV.

    标识符与许可证的友好名称不同。The identifier is different than the friendly name of the license. 例如,音频会议的标识符是 MCOMEETADV。For example, the identifier for Audio Conferencing is MCOMEETADV. 若要了解详细信息,请参阅 产品名称和 SKU 标识符以获取许可To learn more, see Product names and SKU identifiers for licensing.

    #Create a text file with a single column that lists the user principal names (UPNs) of users to assign licenses to. The MSOL service uses the UPN to license user accounts.
    #Example of text file:''
    #user1@domain.com
    #user2@domain.com
    
    #Import Module
    ipmo MSOnline
    
    #Authenticate to MSOLservice
    Connect-MSOLService
    #File prompt to select the userlist txt file
    [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null
      $OFD = New-Object System.Windows.Forms.OpenFileDialog
      $OFD.filter = "text files (*.*)| *.txt"
      $OFD.ShowDialog() | Out-Null
      $OFD.filename
    
    If ($OFD.filename -eq '')
    {
    Write-Host "You did not choose a file. Try again" -ForegroundColor White -BackgroundColor Red
    }
    
    #Create a variable of all users
    $users = Get-Content $OFD.filename
    
    #License each user in the $users variable
    foreach ($user in $users)
        {
        Write-host "Assigning License: $user"
        Set-MsolUserLicense -UserPrincipalName $user -AddLicenses "litwareinc:<CompanyName:License>" -ErrorAction SilentlyContinue
        Set-MsolUserLicense -UserPrincipalName $user -AddLicenses "litwareinc:<CompanyName:License>" -ErrorAction SilentlyContinue
        }
    

    例如,要分配 Microsoft 365 企业版1和音频会议许可证,请在脚本中使用以下语法:For example, to assign Microsoft 365 Enterprise 1 and Audio Conferencing licenses, use the following syntax in the script:

    Set-MsolUserLicense -UserPrincipalName $user -AddLicenses "litwareinc:ENTERPRISEPACK" -ErrorAction SilentlyContinue
    Set-MsolUserLicense -UserPrincipalName $user -AddLicenses "litwareinc:MCOMEETADV" -ErrorAction SilentlyContinue
    

    若要在不调用计划) 许可证的情况下分配 Microsoft Business Voice (,请在脚本中使用以下语法:To assign a Microsoft Business Voice (without Calling Plan) license, use the following syntax in the script:

    Set-MsolUserLicense -UserPrincipalName $user -AddLicenses "litwareinc:BUSINESS_VOICE_DIRECTROUTING" -ErrorAction SilentlyContinue
    

用于授权的产品名称和 SKU 标识符Product names and SKU identifiers for licensing

下面是在使用 PowerShell 管理团队中的许可证时,可用作参考的产品名称及其相应 SKU 部件名称的部分列表。Here's a partial list of product names and their corresponding SKU part names that you can use as a reference when you use PowerShell to manage licenses in Teams.

若要了解详细信息,请参阅 通过 PowerShell 查看许可证和服务产品名称和服务计划标识符以获得许可教育 SKU 参考To learn more, see View licenses and services with PowerShell, Product names and service plan identifiers for licensing, and Education SKU reference.

产品名称Product name SKU 部件名称SKU part name
Microsoft 企业版 E5 (与电话系统) Microsoft Enterprise E5 (with Phone System) ENTERPRISEPREMIUMENTERPRISEPREMIUM
不带音频会议的 Microsoft 企业版 E5 () Microsoft Enterprise E5 (without Audio Conferencing) ENTERPRISEPREMIUM_NOPSTNCONFENTERPRISEPREMIUM_NOPSTNCONF
Microsoft 企业版 E5 (带音频会议) Microsoft Enterprise E5 (with Audio Conferencing) ENTERPRISEPREMIUMENTERPRISEPREMIUM
Microsoft 企业版 E3Microsoft Enterprise E3 ENTERPRISEPACKENTERPRISEPACK
Microsoft 企业版 E1Microsoft Enterprise E1 STANDARDPACKSTANDARDPACK
Microsoft 365 商业基础版Microsoft 365 Business Basic O365_BUSINESS_ESSENTIALSO365_BUSINESS_ESSENTIALS
Microsoft 365 商业标准版Microsoft 365 Business Standard O365_BUSINESS_PREMIUMO365_BUSINESS_PREMIUM
Microsoft 365 商业版Microsoft 365 Business SPBSPB
Microsoft Business Voice (加拿大) Microsoft Business Voice (Canada) BUSINESS_VOICE_MEDBUSINESS_VOICE_MED
Microsoft 商业语音 (英国) Microsoft Business Voice (United Kingdom) BUSINESS_VOICEBUSINESS_VOICE
Microsoft 商业语音 (美国) Microsoft Business Voice (United States) BUSINESS_VOICE_MED2BUSINESS_VOICE_MED2
Microsoft Business Voice (无需通话计划) Microsoft Business Voice (without Calling Plan) BUSINESS_VOICE_DIRECTROUTINGBUSINESS_VOICE_DIRECTROUTING
Microsoft Business Voice (没有通话计划) 美国Microsoft Business Voice (without Calling Plan) for the United States BUSINESS_VOICE_DIRECTROUTING _MEDBUSINESS_VOICE_DIRECTROUTING _MED
音频会议Audio Conferencing MCOMEETADVMCOMEETADV
(按分钟支付的音频会议) Audio Conferencing Pay Per Minute (pay as you go)
需要设置和启用通信信用点数。Requires Communications Credits to be set up and enabled.
MCOMEETACPEAMCOMEETACPEA
电话系统Phone System MCOEVMCOEV
国内和国际通话计划Domestic and International Calling Plan MCOPSTN2MCOPSTN2
国内呼叫计划 (每个用户每月每月3000分钟,对于欧盟国家/地区,每个用户/月1200分钟) Domestic Calling Plan (3000 minutes per user/month for US/PR/CA, 1200 minutes per user/month for EU countries) MCOPSTN1MCOPSTN1
每个国家/地区的国内通话计划 (每个用户/月120分钟) Domestic Calling Plan (120 minutes per user/month for each country)
此计划在美国不可用。This plan isn't available in the United States.
MCOPSTN5MCOPSTN5
每个国家/地区的国内通话计划 (每个用户/月240分钟) Domestic Calling Plan (240 minutes per user/month for each country)
此计划在美国不可用。This plan isn't available in the United States.
MCOPSTN6MCOPSTN6
通信点数Communications Credits MCOPSTNPPMCOPSTNPP