

$teamsConfig = Get-Content $teamsConfigFile -Raw $teamsConfigFile = "$env:APPDATA\Microsoft\Teams\desktop-config.json" Remove-ItemProperty HKCU:\Software\Microsoft\Windows\CurrentVersion\Run -Name "" $entry = $null -eq (Get-ItemProperty HKCU:\Software\Microsoft\Windows\CurrentVersion\Run).""

Then you will be able to use the Prevent Microsoft Teams from starting automatically after installation option (User Configuration -> Policies -> Administrative Templates -> Microsoft Teams). Download and install (update) new ADMX files for Office 365 to the GPO Central Store. There is a special option to disable Teams autostart in Office admx GPO templates. To do it, go to Computer Configuration -> Administrative Templates -> System -> Group Policy, and set the value Merge for Configure user Group Policy loopback processing mode option.

Key path: \Software\Microsoft\Windows\CurrentVersion\Run
