Teams Real Simple with Pictures: Enabling Media Logging with PowerShell

If we have an issue with Teams and we raise a ticket to Microsoft, then occasionally we will be asked to provide logs for engineers to analyse. With Teams, there are several different ones. These include Debug logs, Media logs and Desktop Logs. This week, I noticed that it is now possible to enable Media Logging with PowerShell. Up until this point the user would have to enable it within the Teams client, and this would be problematic for IT in terms of being dependent on users and if it would be enabled at the required time. The Media Logs, by definition, contain diagnostic data about audio, video, and screen sharing. They are linked to call-related issues. Having a problem with resolution? Or an encoder? Or rendering? Or a situation where share control is given in a meeting but cannot be taken back? The Media logs may provide insights to fix the issue. Yet Media Logging is only enabled by default on machines using the Teams client with specific CPU's: any Apple M1, any Intel Xeon, any Intel i9, except for the U, G7, M, and MQ series and any 6th generation and later Intel i7, except for the U, G7, M, and MQ series. So, in many cases it has to be enabled. Being able to do it with PowerShell saves time - for both the user and the admin