Skip to content

New-MSTTeamsApp

Teams: Creates a new app in the Teams tenant app store

#Requires -Version 5.1

[CmdletBinding()]
Param(
    [Parameter(Mandatory = $true)]
    [string]$AppPath,
    [Parameter(Mandatory = $true)]
    [ValidateSet('organization', 'global')]
    [string]$DistributionMethod = 'organization'
)

Process {
    try {
        [hashtable]$cmdArgs = @{'ErrorAction' = 'Stop'; 'Path' = $AppPath; 'DistributionMethod' = $DistributionMethod}

        $result = New-TeamsApp @cmdArgs | Select-Object *

        if ($null -eq $result) {
            Write-Output "Failed to create Teams app"
            return
        }
        $result | Add-Member -NotePropertyName Timestamp -NotePropertyValue (Get-Date -Format 'yyyy-MM-dd HH:mm:ss') -PassThru -Force
    }
    catch { throw }
}

The local path of the app manifest zip file

The type of app in Teams. For LOB apps use "organization"

An interactive directory of PowerShell scripts.