获取 Microsoft Teams 的客户端Get clients for Microsoft Teams

支持 Microsoft Teams 的客户端包括桌面(Windows、Mac 和 Linux)、Web 和移动设备(Android 和 iOS)。Microsoft Teams has clients available for desktop (Windows, Mac, and Linux), web, and mobile (Android and iOS). 这些客户端都要求有活动的 Internet 连接,不支持脱机模式。These clients all require an active internet connection and do not support an offline mode.

备注

有关不同平台上的每个客户端功能的详细信息,请参阅 团队功能(按平台)。For details about each clients' capabilities on different platforms, see Teams features by platform.

备注

自 2018 年 11 月 29 日起,用户将不再能够使用 Microsoft Store 提供的 Microsoft Teams for Windows 10 S(预览版)应用。Effective November 29, 2018, you'll no longer be able to use the Microsoft Teams for Windows 10 S (Preview) app, available from the Microsoft Store. 现在,可以在运行 Windows 10 S 模式的设备上下载并安装 Teams 桌面客户端。Instead, you can now download and install the Teams desktop client on devices running Windows 10 S mode. 若要下载桌面客户端,请转到 https://teams.microsoft.com/downloadsTo download the desktop client, go to https://teams.microsoft.com/downloads. Teams 桌面客户端的 MSI 内部版本尚不适用于运行 Windows 10 S 模式的设备。MSI builds of the Teams desktop client are not yet available for devices running Windows 10 S mode.

有关 Windows 10 S 模式的详细信息,请参阅 Windows 10 S 模式简介For more information about Windows 10 S mode, see Introducing Windows 10 in S mode.

桌面客户端Desktop client

提示

观看以下会话以了解 Windows 桌面客户端的优势,如何规划它,以及如何部署它:Teams Windows 桌面客户端Watch the following session to learn about the benefits of the Windows Desktop Client, how to plan for it, and how to deploy it: Teams Windows Desktop Client

Microsoft 团队桌面客户端是独立的应用程序,也 可在适用于企业的 Microsoft 365 应用中使用The Microsoft Teams desktop client is a standalone application and is also available in Microsoft 365 Apps for enterprise. 团队可用于32位和64位版本的 Windows (8.1 或更高版本) 和 Windows Server (2012 R2 或更高版本) ,以及格式 (的 macOS 和 Linux) .deb .rpmTeams is available for 32-bit and 64-bit versions of Windows (8.1 or later) and Windows Server (2012 R2 or later), as well as for macOS and Linux (in .deb and .rpm formats). 在 Windows 上,Teams 需要 .NET Framework 4.5 或更高版本;如果没有,Teams 安装程序将为你安装。On Windows, Teams requires .NET Framework 4.5 or later; the Teams installer will offer to install it for you if you don't have it. 在 Linux 上,程序包管理器(例如 aptyum)将尝试为你安装任何要求。On Linux, package managers such as apt and yum will try to install any requirements for you. 但是,如果没有,则在 Linux 上安装 Teams 前,你将需要安装任何报告的要求。However, if they don't then you will need to install any reported requirements before installing Teams on Linux.

桌面客户端为团队会议、群组通话和专线一对一呼叫提供实时通信支持(音频、视频和内容共享)。The desktop clients provide real-time communications support (audio, video, and content sharing) for team meetings, group calling, and private one-on-one calls.

如果最终用户有合适的本地权限(在 PC 上安装 Teams 客户端不需要管理权限,但在 Mac 上需要),可以直接从 https://teams.microsoft.com/downloads 下载并安装桌面客户端。Desktop clients can be downloaded and installed by end users directly from https://teams.microsoft.com/downloads if they have the appropriate local permissions (admin rights are not required to install the Teams client on a PC but are required on a Mac).

备注

有关在 Chromebook 上安装团队的更多详细信息,请参阅 如何在 Chromebook 上安装和运行 Microsoft OfficeFor more details about installing Teams on a Chromebook, please see How to install and run Microsoft Office on a Chromebook.

IT 管理员可以选择其首选方法将安装文件分发到其组织中的计算机上。IT admins can choose their preferred method to distribute the installation files to computers in their organization. 一些示例包括 Microsoft Endpoint Configuration Manager (Windows) 或 Jamf Pro (macOS)。Some examples include Microsoft Endpoint Configuration Manager (Windows) or Jamf Pro (macOS). 要获取用于 Windows 分发的 MSI 包,请参阅使用 MSI 安装 Microsoft TeamsTo get the MSI package for Windows distribution, see Install Microsoft Teams using MSI.

备注

通过这些机制分发客户端仅适用于初次安装 Microsoft Team 客户端,不适用于将来更新。Distribution of the client via these mechanisms is only for the initial installation of Microsoft Team clients and not for future updates.

WindowsWindows

适用于 Windows 的 Microsoft Teams 安装提供 32 位和 64 位体系结构的可下载安装程序。The Microsoft Teams installation for Windows provides downloadable installers in 32-bit and 64-bit architecture.

备注

安装的 Windows 和 Office 的体系结构不限制 Microsoft Teams 的体系结构(32 位和 64 位)。The architecture (32-bit vs. 64-bit) of Microsoft Teams is agnostic to the architecture of Windows and Office that is installed.

Windows 客户端部署到位于用户配置文件中的 AppData 文件夹中。The Windows client is deployed to the AppData folder located in the user’s profile. 部署到用户的本地配置文件后,无需提升的权限即可安装客户端。Deploying to the user’s local profile allows the client to be installed without requiring elevated rights. Windows 客户端会利用以下位置:The Windows client leverages the following locations:

  • %LocalAppData%\Microsoft\Teams%LocalAppData%\Microsoft\Teams

  • %LocalAppData%\Microsoft\TeamsMeetingAddin%LocalAppData%\Microsoft\TeamsMeetingAddin

  • %AppData%\Microsoft\Teams%AppData%\Microsoft\Teams

  • %LocalAppData%\SquirrelTemp%LocalAppData%\SquirrelTemp

用户首次使用 Microsoft Teams 客户端启动呼叫时,他们可能会注意到有关 Windows 防火墙设置的警告,要求用户允许通信。When users initiate a call using the Microsoft Teams client for the first time, they might notice a warning with the Windows firewall settings that asks for users to allow communication. 可以指示用户忽略此消息,因为即使忽略此警告,也可以进行呼叫。Users might be instructed to ignore this message because the call will work, even when the warning is dismissed.

Windows 安全警报对话框屏幕截图。

备注

即使选择“取消”忽略该提示,也将会更改 Windows 防火墙配置。Windows Firewall configuration will be altered even when the prompt is dismissed by selecting “Cancel”. 将为 teams.exe 创建两个入站规则,同时为 TCP 和 UDP 协议创建 "允许" 操作。Two inbound rules for teams.exe will be created with Allow action for both TCP and UDP protocols.

如果你想要防止团队在用户第一次从团队发出呼叫时提示用户创建防火墙规则,请使用以下 示例 PowerShell 脚本-入站防火墙规则If you want to prevent Teams from prompting users to create firewall rules when the users make their first call from Teams, use the Sample PowerShell script - inbound firewall rule below.

MacMac

Mac 用户可以使用 macOS 计算机的 PKG 安装文件安装 Teams。Mac users can install Teams by using a PKG installation file for macOS computers. 安装 Mac 客户端需要管理访问权限。Administrative access is required to install the Mac client. 将 macOS 客户端安装到 /Applications 文件夹中。The macOS client is installed to the /Applications folder.

使用 PKG 文件安装 TeamsInstall Teams by using the PKG file

  1. Mac 下的 Teams下载页面中,单击 “下载”From the Teams download page, under Mac, click Download.
  2. 双击 PKG 文件。Double click the PKG file.
  3. 按照安装向导的说明完成安装。Follow the installation wizard to complete the installation.
  4. Teams 将安装到 /Applications 文件夹中。Teams will be installed to /Applications folder. 它是计算机范围内的安装。It is a machine-wide installation.

备注

安装期间,PKG 将提示输入管理员凭据。During the installation, the PKG will prompt for admin credentials. 无论用户是否为管理员,都需要输入管理员凭据。The user needs to enter the admin credentials, regardless of whether or not the user is an admin.

如果用户当前有 Teams 的 DMG 安装,并且想要将其替换为 PKG 安装,则用户应:If a user currently has a DMG installation of Teams and wants to replace it with the PKG installation, the user should:

  1. 退出 Teams 应用。Exit the Teams app.
  2. 卸载 Teams 应用。Uninstall the Teams app.
  3. 安装 PKG 文件。Install the PKG file.

IT 管理员可以使用 Teams 的托管部署将安装文件分发到其组织中的所有 Mac,例如 Jamf Pro。IT admins can use managed deployment of Teams to distribute the installation files to all Macs in their organization, such as Jamf Pro.

备注

如果安装 PKG 时遇到问题,请告诉我们。If you experience issues installing the PKG, let us know. 在本文末尾的 “反馈” 部分中,单击 “产品反馈”In the Feedback section at the end of this article, click Product feedback.

LinuxLinux

用户将能够以 .deb.rpm 格式安装本机 Linux 程序包。Users will be able to install native Linux packages in .deb and .rpm formats. 安装 DEB 包或 RPM 程序包将自动安装程序包存储库。Installing the DEB or RPM package will automatically install the package repository.

  • DEB https://packages.microsoft.com/repos/ms-teams stable mainDEB https://packages.microsoft.com/repos/ms-teams stable main
  • RPM https://packages.microsoft.com/yumrepos/ms-teamsRPM https://packages.microsoft.com/yumrepos/ms-teams

使用系统的程序包管理器启用自动更新的签名密钥将自动安装。The signing key to enable auto-updating using the system's package manager is installed automatically. 但是,也可以在以下位置找到它:(https://packages.microsoft.com/keys/microsoft.asc).However, it can also be found at: (https://packages.microsoft.com/keys/microsoft.asc). Microsoft Teams 每月发布一次,并且如果正确安装了存储库,则系统程序包管理器应按照与系统中其他程序包相同的方式处理自动更新。Microsoft Teams ships monthly and if the repository was installed correctly, then your system package manager should handle auto-updating in the same way as other packages on the system.

备注

如果发现 Bug,请使用客户端中的 Report a Problem 进行提交。If you find a bug, submit it using Report a Problem from within the client. 对于已知问题,请参阅 组织中的支持团队For known issues, see Support Teams in your organization. 对于适用于 Linux 的 Teams 支持,可以使用 Microsoft 问答上的 Linux 论坛支持频道For Teams for Linux support you can use the Linux forum support channel on Microsoft Q&A. 发布问题时,请务必使用 teams-linux 标记。Be sure to use the teams-linux tag when posting questions.

使用 DEB 程序包安装团队Install Teams using DEB package

  1. https://aka.ms/getteams 下载该程序包。Download the package from https://aka.ms/getteams.
  2. 使用以下方式之一进行安装:Install using one of the following:
    • 打开相关的程序包管理工具,完成自助式 Linux 应用安装过程。Open the relevant package management tool and go through the self-guided Linux app installation process.
    • 或者,如果你喜欢“终端”,请键入:sudo apt install **teams download file**Or if you love Terminal, type: sudo apt install **teams download file**

可以通过“活动”启动团队,也可以通过键入 teams 通过“终端”启动 Teams。You can launch Teams via Activities or via Terminal by typing teams.

使用 RPM 程序包安装团队Install Teams using RPM package

  1. https://aka.ms/getteams 下载该程序包。Download the package from https://aka.ms/getteams.
  2. 使用以下方式之一进行安装:Install using one of the following:
    • 打开相关的程序包管理工具,完成自助式 Linux 应用安装过程。Open the relevant package management tool and go through the self-guided Linux app installation process.
    • 或者,如果你喜欢“终端”,请键入:sudo yum install **teams download file**Or if you love Terminal, type: sudo yum install **teams download file**

可以通过“活动”启动团队,也可以通过键入 teams 通过“终端”启动 Teams。You can launch Teams via Activities or via Terminal by typing teams.

从命令行手动安装Install manually from the command line

在 Debian 和 Ubuntu 分发上手动安装:Install manually on Debian and Ubuntu distributions:

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
 
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/ms-teams stable main" > /etc/apt/sources.list.d/teams.list'
 
sudo apt update
sudo apt install teams

在基于 RHEL、Fedora 和 CentOS 的分发上手动安装:Install manually on RHEL, Fedora and CentOS based distributions:

sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
 
sudo sh -c 'echo -e "[teams]\nname=teams\nbaseurl=https://packages.microsoft.com/yumrepos/ms-teams\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/teams.repo'
 
sudo dnf check-update
sudo dnf install teams

或者,使用 yum 代替 dnf:Alternatively, to use yum instead of dnf:

yum check-update
sudo yum install teams

在基于 openSUSE 的分发上手动安装:Install manually on openSUSE based distributions:

sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
 
sudo sh -c 'echo -e "[teams]\nname=teams\nbaseurl=https://packages.microsoft.com/yumrepos/ms-teams\nenabled=1\nautorefresh=1\nkeeppackages=0\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/zypp/repos.d/teams.repo'
 
sudo zypper refresh
sudo zypper install teams

Web 客户端Web client

Web 客户端 (https://teams.microsoft.com) 是具有完整功能的客户端,可以从各种浏览器使用该客户端。The web client (https://teams.microsoft.com) is a full, functional client that can be used from a variety of browsers. Web 客户端使用 webRTC 支持通话和会议,因此在 Web 浏览器中运行 Teams 不需要插件或进行下载。The web client supports Calling and Meetings by using webRTC, so there is no plug-in or download required to run Teams in a web browser. 必须配置浏览器以允许第三方 Cookie。The browser must be configured to allow third-party cookies.

Teams 完全支持以下 Internet 浏览器,存在特别提出的通话和会议例外情况。Teams fully supports the following Internet browsers, with noted exceptions for calling and meetings. 此表适用于在台式计算机上运行的操作系统。This table applies to operating systems running on desktop computers.

浏览器Browser 通话 - 音频、视频和共享Calling - audio, video, and sharing 会议 - 音频、视频和共享1 2 3Meetings - audio, video, and sharing1 2 3
Internet Explorer 11Internet Explorer 11 不支持Not supported 仅当会议包含 PSTN 坐标时才支持会议。Meetings are supported only if the meeting includes PSTN coordinates. 用户必须下载 Teams 桌面客户端,才能在没有 PSTN 坐标的情况下参加 IE11 上的会议。To attend a meeting on IE11 without PSTN coordinates, users must download the Teams desktop client.

视频:不支持Video: Not supported

共享:仅限传入的共享(不传出)  Sharing: Incoming sharing only (no outgoing) 

从 2021 年 8 月 17 日起,Microsoft 365 应用和服务将不再支持 Internet Explorer 11(从 2020 年 11 月 30 日起,Microsoft Teams 将不再支持 Internet Explorer 11)。Microsoft 365 apps and services will not support Internet Explorer 11 starting August 17, 2021 (Microsoft Teams will not support Internet Explorer 11 earlier, starting November 30, 2020). 了解详细信息Learn more. 请注意,Internet Explorer 11 将保留为受支持的浏览器。Please note that Internet Explorer 11 will remain a supported browser. Internet Explorer 11 是 Windows 操作系统的一个组件,并在安装其的产品上遵循着生命周期策略Internet Explorer 11 is a component of the Windows operating system and follows the Lifecycle Policy for the product on which it is installed.
Microsoft Edge RS2 或更高版本Microsoft Edge, RS2 or later 完全支持,除了不传出共享4Fully supported, except no outgoing sharing4 完全支持,不排除传出共享Fully supported, except no outgoing sharing
Microsoft Edge(基于 Chromium)的最新版本及前两个版本Microsoft Edge (Chromium-based), the latest version plus two previous versions 完全支持Fully supported 完全支持Fully supported
Google Chrome 的最新版本及前两个版本Google Chrome, the latest version plus two previous versions 完全支持Fully supported 完全支持Fully supported

在 Chrome 版本 72 或更高版本上支持共享,无需任何插件或扩展。Sharing is supported without any plug-ins or extensions on Chrome version 72 or later.
Safari 13+Safari 13+ 不支持 1 对 1 通话。1:1 calls not supported. 支持组通话(完整音频支持)。Group calls supported with full audio support.

视频:仅限接收Video: Incoming only

共享:仅限传入的共享(不传出)Sharing: Incoming sharing only (no outgoing) 
支持会议(完整音频支持)。Meetings are supported with full audio support.

视频:仅限接收Video: Incoming only

共享:仅限传入的共享(不传出)Sharing: Incoming sharing only (no outgoing) 
Firefox 的最新版本及前两个版本Firefox, the latest version plus two previous versions 不支持Not supported 仅当会议包含 PSTN 坐标时才支持会议。Meetings are supported only if the meeting includes PSTN coordinates. 用户必须下载 Teams 桌面客户端,才能在没有 PSTN 坐标的情况下参加 Firefox 上的会议。To attend a meeting on Firefox without PSTN coordinates, users must download the Teams desktop client.

视频:不支持Video: Not supported

共享:仅限传入的共享(不传出)Sharing: Incoming sharing only (no outgoing) 
版本 13 之前的 SafariSafari versions before 13 不支持Not supported 仅当会议包含 PSTN 坐标时才支持会议。Meetings are supported only if the meeting includes PSTN coordinates. 用户必须下载 Teams 桌面客户端,才能在没有 PSTN 坐标的情况下参加 Safari 上的会议。To attend a meeting on Safari without PSTN coordinates, users must download the Teams desktop client.

视频:不支持Video: Not supported

共享:仅限传入的共享(不传出)Sharing: Incoming sharing only (no outgoing)

在预览阶段中,将在 11.1 及更高版本上启用 Safari。Safari is enabled on versions higher than 11.1 in preview. 处于预览阶段时,Safari 的“智能跟踪预防”功能存在已知问题While in preview, there are known issues with Safari's Intelligent Tracking Prevention.

1 为了在共享过程中授予或获得对共享内容的控制权,双方必须都使用 Teams 桌面客户端。1 To give and take control of shared content during sharing, both parties must be using the Teams desktop client. 如果任何一方在浏览器中运行 Teams,则不支持控制。Control isn't supported when either party is running Teams in a browser. 这是由我们计划修复的一个技术限制造成。This is due to a technical limitation that we're planning to fix.

2 如果在浏览器中运行 Teams,“模糊我的背景”不可用。2 Blur my background isn't available when you run Teams in a browser. 此功能仅在 Teams 桌面版客户端中可用。This feature is only available in the Teams desktop client.

3 在浏览器上运行的 Teams 会议仅限于活动扬声器的单个传入视频源。3 Teams meetings on browsers are limited to a single incoming video feed of active speaker.

4 Edge RS2 或更高版本不支持通过 HTTP 代理发送实时音频和视频通信流。4 Edge RS2 or later doesn't support sending real-time audio and video traffic through HTTP proxies.

备注

只要操作系统能够运行支持的浏览器,台式计算机就支持 Teams。As long as an operating system can run the supported browser, Teams is supported on desktop computers. 例如,可以通过在 Linux 操作系统上运行 Firefox 来使用 Teams。For example, running Firefox on the Linux operating system is an option for using Teams.

对于移动操作系统,建议运行可以从 Android 和 iOS 应用商店获得的 Teams 应用。For mobile operating systems, we recommend that you run the Teams app, available from the Android and iOS stores. 虽然支持在移动操作系统中运行 Teams,但许多功能是不可用的。Running Teams in a mobile operating system is supported, but many features are unavailable.

Web 客户端在连接到 https://teams.microsoft.com 时执行浏览器版本检测。The web client performs browser version detection upon connecting to https://teams.microsoft.com. 如果检测到不支持的浏览器版本,它将阻止对 Web 界面的访问,并建议用户下载桌面客户端或移动应用。If an unsupported browser version is detected, it will block access to the web interface and recommend that the user download the desktop client or mobile app.

移动客户端Mobile clients

Microsoft Teams 移动应用适用于 Android 和 iOS,适合参与基于聊天的对话的忙碌用户,允许进行点对点音频呼叫。The Microsoft Teams mobile apps are available for Android and iOS, and are geared for on-the-go users participating in chat-based conversations and allow peer-to-peer audio calls. 对于移动应用,请访问 Google Play 和 Apple App Store 的相关移动应用商店。For mobile apps, go to the relevant mobile stores Google Play and the Apple App Store. Windows Phone 应用已于 2018 年 7 月 20 日停用,可能无法正常运行。The Windows Phone App was retired July 20, 2018 and may no longer work.

以下是在中国获取 Android 版 Teams 的方法。In China, here's how to get Teams for Android.

Microsoft Teams 移动应用的支持移动平台如下:Supported mobile platforms for Microsoft Teams mobile apps are the following:

  • Android:支持仅限于 Android 的最后四个主要版本。Android: Support is limited to the last four major versions of Android. 新的 Android 主要版本发布后,将正式支持新版本和前三个版本。When a new major version of Android is released, the new version and the previous three versions are officially supported.

  • iOS:支持仅限于 iOS 的两个最新主要版本。iOS: Support is limited to the two most recent major versions of iOS. 新的 iOS 主要版本发布后,将正式支持 iOS 新版本和前一版本。When a new major version of iOS is released, the new version of iOS and the previous version are officially supported.

备注

必须向公众提供移动版本,Teams 才能按预期工作。The mobile version must be available to the public in order for Teams to work as expected.

移动应用仅通过各自移动平台的应用商店进行分发和更新。Mobile apps are distributed and updated through the respective mobile platform’s app store only. Microsoft 不支持通过 MDM 或侧加载来分发移动应用。Distribution of the mobile apps via MDM or side-loading is not supported by Microsoft. 在支持的移动平台上安装移动应用后,将支持 Teams 移动应用本身,前提是该版本是 3 个月内的最新版本。Once the mobile app has been installed on a supported mobile platform, the Teams Mobile App itself will be supported provided the version is within three months of the current release.

描述决策点的图标 决策点Decision Point 是否存在阻止用户在其设备上安装合适 Microsoft Teams 客户端的任何限制?Are there any restrictions preventing users from installing the appropriate Microsoft Teams client on their devices?
描述后续步骤的图标 后续步骤Next Steps 如果贵组织限制软件安装,请确保 Microsoft Teams 不会受到阻止。If your organization restricts software installation, make sure that process is compatible with Microsoft Teams. 注意:PC 客户端安装不需要管理权限,但在 Mac 上安装需要。Note: Admin rights are not required for PC client installation but are required for installation on a Mac.

客户端更新管理Client update management

当前,Microsoft Teams 服务会自动更新客户端,无需 IT 管理员干预。Clients are currently updated automatically by the Microsoft Teams service with no IT administrator intervention required. 如果有更新,客户端将自动下载更新,当应用空闲一段时间后,将开始执行更新过程。If an update is available, the client will automatically download the update and when the app has idled for a period of time, the update process will begin.

客户端配置Client-side configurations

当前,未提供支持的选项来通过租户管理、PowerShell、组策略对象或注册表配置客户端。Currently, there are no supported options available to configure the client either through the tenant admin, PowerShell, Group Policy Objects or the registry.

通知设置Notification settings

当前,未提供选项允许 IT 管理员配置客户端通知设置。There are currently no options available for IT administrators to configure client-side notification settings. 所有通知选项均由用户设置。All notification options are set by the user. 下图概括显示了默认客户端设置。The figure below outlines the default client settings.

“通知设置”屏幕截图。

PowerShell 脚本示例-入站防火墙规则Sample PowerShell script - inbound firewall rule

需要在提升的管理员帐户上下文中的客户端计算机上运行的此示例脚本将为 c:\users 中找到的每个用户文件夹创建新的入站防火墙规则。This sample script, which needs to run on client computers in the context of an elevated administrator account, will create a new inbound firewall rule for each user folder found in c:\users. Teams 找到此规则后,当用户通过 Teams 进行首次呼叫时,将阻止 Teams 应用程序提示用户创建防火墙规则。When Teams finds this rule, it will prevent the Teams application from prompting users to create firewall rules when the users make their first call from Teams.

<#
.SYNOPSIS
   Creates firewall rules for Teams.
.DESCRIPTION
   (c) Microsoft Corporation 2018. All rights reserved. Script provided as-is without any warranty of any kind. Use it freely at your own risks.
   Must be run with elevated permissions. Can be run as a GPO Computer Startup script, or as a Scheduled Task with elevated permissions. 
   The script will create a new inbound firewall rule for each user folder found in c:\users. 
   Requires PowerShell 3.0.
#>

#Requires -Version 3

$users = Get-ChildItem (Join-Path -Path $env:SystemDrive -ChildPath 'Users') -Exclude 'Public', 'ADMINI~*'
if ($null -ne $users) {
    foreach ($user in $users) {
        $progPath = Join-Path -Path $user.FullName -ChildPath "AppData\Local\Microsoft\Teams\Current\Teams.exe"
        if (Test-Path $progPath) {
            if (-not (Get-NetFirewallApplicationFilter -Program $progPath -ErrorAction SilentlyContinue)) {
                $ruleName = "Teams.exe for user $($user.Name)"
                "UDP", "TCP" | ForEach-Object { New-NetFirewallRule -DisplayName $ruleName -Direction Inbound -Profile Domain -Program $progPath -Action Allow -Protocol $_ }
                Clear-Variable ruleName
            }
        }
        Clear-Variable progPath
    }
}