It may be necessary to uninstall the Teamgage app for a number of reasons, if you find yourself in this situation we provide a couple of useful Powershell scripts which can be used to bulk uninstall for either Teams or users.
Uninstall the app for all users in a Team/Channel:
- $appId = '61aa6197-4b01-4bb4-a7a6-6ecf477654a0'
- $teamId = 'TEAM ID HERE'
- Get-TeamUser -GroupId $teamId | ForEach-Object {
- $appInstalled = Get-TeamsAppInstallation -UserId $_.UserId -AppId $appId
- if ($appInstalled) {
- Write-Host "Uninstalling from: $($_.Name)"
- Remove-TeamsAppInstallation -UserId $_.UserId -AppId $appId
- }
- else {
- Write-Host "Skipping user: $($_.Name)"
- }
- }
Uninstall the app from all Teams/Channels:
- $appId = '61aa6197-4b01-4bb4-a7a6-6ecf477654a0'
- Get-Team -Archived $false | ForEach-Object {
- $appInstalled = Get-TeamsAppInstallation -TeamId $_.GroupId -AppId $appId
- if ($appInstalled) {
- Write-Host "Uninstalling from: $($_.DisplayName)"
- Remove-TeamsAppInstallation -TeamId $_.GroupId -AppId $appId
- }
- else {
- Write-Host "Skipping team: $($_.DisplayName)"
- }
- }