By default, when you install Office 365/Office 2019, all Microsoft Office apps are installed, including Teams (you can install only specific Office apps using Office Deployment Tool). MS Teams is configured to start automatically when a user logs in to their computer. However, if you are not using Microsoft Teams or don’t want it to consume your host resources, you can disable Teams auto startup (it is especially true for RDS hosts with Office 365).
How to Stop Teams from Opening on Startup in Windows?
You can manually disable Microsoft Teams autostart in its settings. Open the app and go to Settings -> General -> Application. Uncheck the Auto-start application option. Restart the app.
You can disable Teams autostart through the registry. To do it, remove the com.squirrel.Teams.Teams registry parameter from the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run reg key (its default value is C:\Users\%username%\AppData\Local\Microsoft\Teams\Update.exe --processStart "Teams.exe" --process-start-args "--system-initiated"
).
To disable Teams autorun for all users in your AD domain, you can create a separate GPO that removes this registry parameter:
- Create a new GPO and link it to an OU with computers you want to disable Teams autostart on;
- Go to User Configuration -> Preferences -> Windows Settings -> Registry;
- Create a new Group Policy Preferences rule to remove the registry parameter: Action: Delete
Hive: HKEY_CURRENT_USER
Key path: \Software\Microsoft\Windows\CurrentVersion\Run
Value name: com.squirrel.Teams.Teams - Enable GPO loopback processing mode. 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.
There is a special option to disable Teams autostart in Office admx GPO templates. Download and install (update) new ADMX files for Office 365 to the GPO Central Store. Then you will be able to use the Prevent Microsoft Teams from starting automatically after installation option (User Configuration -> Policies -> Administrative Templates -> Microsoft Teams).
To reset all Teams user autostart settings, Microsoft suggests running the following PowerShell script: https://docs.microsoft.com/en-us/microsoftteams/scripts/powershell-script-teams-reset-autostart.
Or use my simple script to reset Teams autostart settings in the registry and config JSON file %APPDATA%\Microsoft\Teams\desktop-config.json
:
$entry = $null -eq (Get-ItemProperty HKCU:\Software\Microsoft\Windows\CurrentVersion\Run)."com.squirrel.Teams.Teams"
if ( !$entry ) {
Remove-ItemProperty HKCU:\Software\Microsoft\Windows\CurrentVersion\Run -Name "com.squirrel.Teams.Teams"
}
$teamsConfigFile = "$env:APPDATA\Microsoft\Teams\desktop-config.json"
$teamsConfig = Get-Content $teamsConfigFile -Raw
if ( $teamsConfig -match "openAtLogin`":false") {
break
}
elseif ( $teamsConfig -match "openAtLogin`":true" ) {
$teamsConfig = $teamsConfig -replace "`"openAtLogin`":true","`"openAtLogin`":false"
}
else {
$teamsAutoStart = ",`"appPreferenceSettings`":{`"openAtLogin`":false}}"
$teamsConfig = $teamsConfig -replace "}$",$teamsAutoStart
}
$teamsConfig | Set-Content $teamsConfigFile
You can run this code as a PowerShell logon script in Group Policy.
Disable Microsoft Teams Auto-Startup on Linux
Microsoft Teams client in Linux distros (Ubuntu, Fedora, CentOS, and RHEL) is also preconfigured to start automatically. Teams is started in Linux via the application startup file /home/$USER/.config/autostart/teams.deskto
p.
You can disable Teams autostart in the GUI or edit its configuration file (teams.desktop).
vi ~/.config/autostart/teams.desktop
Change the following value from True to False:
X-GNOME-Autostart-enabled=false
Prevent making changes to the file (otherwise, if you run MS Teams manually, it will restore the original configuration of the file):
sudo chattr +i ~/.config/autostart/teams.desktop