Skip to content

Intune focused powershell script to create firewall rules for Microsoft Teams with enhanced logging.

Notifications You must be signed in to change notification settings

calibur/Update-TeamsFWRules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Update-TeamsFWRules

PowerShell Platform: Windows Build Status

**TL;DR:**Automate creation of Teams-specific firewall rules to eliminate initial Windows Security Alerts during Teams call initiation.


Overview

Update-TeamsFWRules is a PowerShell script designed to automatically create optimized Windows Firewall rules for Microsoft Teams.
It is intended for deployment via Microsoft Intune or Scheduled Task, targeting seamless user experience by eliminating security prompts when users initiate Teams calls.

Modified from Microsoft script found at: https://docs.microsoft.com/en-us/microsoftteams/get-clients#sample-powershell-script

As well as community script fouund at: https://github.com/mardahl/MyScripts-iphase.dk/blob/master/Update-TeamsFWRules.ps1


Features

  • Creates inbound firewall rules specific to the currently logged-in user's Teams client.
  • Supports force cleanup of pre-existing inconsistent firewall rules.
  • Logs all major actions and errors to Event Viewer > Applications and Services Logs > Teams Firewall Rules.
  • Designed for automation via Intune or Scheduled Tasks at user login.

Prerequisites

  • PowerShell 3.0 or newer
  • Windows OS with Microsoft Teams Desktop Client installed
  • Administrative privileges (Run as Administrator)
  • Execute in SYSTEM context (recommended)

Usage

.\Update-TeamsFWRules.ps1 [-Force]