UninstallTeams

2.0.1

Uninstalls Microsoft Teams completely. Optional parameters to disable the Chat widget (Win+C) and prevent Office from installing Teams.

The script stops the Teams process, uninstalls Teams using the uninstall key, uninstalls Teams from the Program Files (x86) directory, uninstalls Teams from the AppData directory, removes the Teams AppxPackage, deletes the Microsoft
Uninstalls Microsoft Teams completely. Optional parameters to disable the Chat widget (Win+C) and prevent Office from installing Teams.

The script stops the Teams process, uninstalls Teams using the uninstall key, uninstalls Teams from the Program Files (x86) directory, uninstalls Teams from the AppData directory, removes the Teams AppxPackage, deletes the Microsoft Teams directory in AppData, deletes the Teams directory in AppData, removes the startup registry keys for Teams, and removes the Desktop and Start Menu icons for Teams.

Show more

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name UninstallTeams

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Package Details

Author(s)

  • asherto

Tags

PowerShell Microsoft Teams remove uninstall delete erase uninstaller widget chat enable disable change

Functions

Get-GitHubRelease CheckForUpdate Get-ChatWidgetStatus Set-ChatWidgetStatus Get-OfficeTeamsInstallStatus Set-OfficeTeamsInstallStatus Write-Section Get-UninstallRegistryKey Get-UninstallString Remove-Shortcut Remove-DesktopShortcuts Remove-StartMenuShortcuts Test-Admin Test-TeamsInstalled

Dependencies

This script has no dependencies.

Release Notes

[Version 0.0.1] - Initial Release.
[Version 0.0.2] - Fixed typo and confirmed directory existence before removal.
[Version 0.0.3] - Added support for Uninstall registry key.
[Version 0.0.4] - Added to GitHub.
[Version 0.0.5] - Fixed signature.
[Version 0.0.6] - Fixed various bugs.
[Version 0.0.7] - Added removal AppxPackage.
[Version 0.0.8] - Added removal of startup entries.
[Version 1.0.0] - Added ability to optionally disable Chat widget (Win+C) which will reinstall Teams. Major refactor of code.
[Version 1.0.1] - Added URL to -CheckForUpdate function when script is out of date.
[Version 1.0.2] - Improve description.
[Version 1.0.3] - Fixed bug with -Version.
[Version 1.0.4] - Improved CheckForUpdate function by converting time to local time and switching to variables.
[Version 1.0.5] - Changed -CheckForUpdates to -CheckForUpdate.
[Version 1.1.0] - Various bug fixes. Added removal of Desktop and Start Menu shortcuts. Added method to prevent Office from installing Teams. Added folders and registry keys to detect.
[Version 1.1.1] - Improved Chat widget warning detection. Improved output into section headers.
[Version 1.1.2] - Improved DisableOfficeTeamsInstall by adding registry key if it doesn't exist.
[Version 1.1.3] - Added TeamsMachineInstaller registry key for deletion.
[Version 1.1.4] - Added Teams uninstall registry key for deletion.
[Version 1.2.0] - Improved functionality of uninstall key removal by detecting MsiExec product GUID to uninstall teams. Added additional startup registry keys.
[Version 1.2.1] - Added additional file and registry uninstall locations.
[Version 1.2.2] - Improved detection of registry uninstall keys. Improved error handling.
[Version 1.2.3] - Fixed bug when uninstalling Teams from the uninstall registry key and using MsiExec.exe.
[Version 1.2.4] - Added AutorunsDisabled registry keys for deletion.
[Version 1.2.5] - Improved path handling for Desktop and Programs folder paths by using special folders.
[Version 2.0.0] - Added detection of whether Teams is installed before attempting to uninstall it. Added an explicit administrator check with a clear message (the #Requires statement is ignored when the script is piped to iex). Added removal of the Teams provisioned package so Teams does not reinstall for new user profiles. Added removal of classic Teams folders from all user profiles. Added non-zero exit code on failure for deployment tools. Fixed bug where only the last uninstall string search was used. Fixed Appx package name matching. Fixed version comparison in -CheckForUpdate. Fixed missing quote in output. Removed unused Check-GitHubRelease function.
[Version 2.0.1] - Fixed script closing the console window under irm | iex by replacing bare exits with guarded exits (exit for file runs, return for iex).

FileList

Version History

Version Downloads Last updated
2.0.1 (current version) 15 8/31/2026
2.0.0 4 8/31/2026
1.2.5 267,399 8/1/2024
1.2.4 90 8/1/2024
1.2.3 159,939 1/7/2024
1.2.2 12 1/7/2024
1.2.0 696 10/14/2023
1.1.4 17 10/14/2023
1.1.3 10 10/14/2023
1.1.2 346 8/30/2023
1.1.1 38 8/25/2023
1.1.0 12 8/25/2023
1.0.3 36 6/20/2023
1.0.2 11 6/20/2023
1.0.1 12 6/20/2023
1.0.0 28 6/20/2023
0.0.8 23 5/2/2023
0.0.7 48 8/29/2022
0.0.6 21 8/29/2022
0.0.5 22 8/23/2022
0.0.3 20 8/23/2022
0.0.2 37 7/30/2022
0.0.1 21 7/30/2022
Show more