Skip to content

Remove-MSTTeamsApp

Teams: Removes an app from the Teams tenant app store

#Requires -Version 5.1

[CmdletBinding()]
Param(
    [Parameter(Mandatory = $true)]
    [string]$AppId
)

Process {
    try {
        $appInfo = Get-TeamsApp -Id $AppId -ErrorAction Stop | Select-Object -ExpandProperty DisplayName
        $null = Remove-TeamsApp -Id $AppId -ErrorAction Stop

        [PSCustomObject]@{
            Timestamp = Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
            AppId     = $AppId
            AppName   = $appInfo
            Status    = "App '$appInfo' successfully removed from Teams tenant app store"
        }
    }
    catch { throw }
}

The app's ID generated by Teams (different from the external ID)

An interactive directory of PowerShell scripts.