Quality of Service (QoS) is a mechanism that lets you prioritize certain types of network traffic. Prioritizing the traffic for real-time communications services such as Teams is important in order to deliver a business-grade user experience. For QoS to be truly effective, a QoS-capable connection must be configured end-to-end (PC, network switches, and routers to the cloud), because any part in the path that fails to support QoS could degrade the quality of the entire call.
Just like i did for Skype for Business, i created another Powershell script just for Microsoft Teams. This script will help you to set the right QoS policies and correct registry items.
You can download the script for free from the TechNet Gallery