Get-MSTTeamTemplateList-qf
Teams: Query-format list of team templates
#Requires -Version 5.1
[CmdletBinding()]
Param(
[string]$PublicTemplateLocale
)
Process {
try {
[hashtable]$cmdArgs = @{'ErrorAction' = 'Stop'}
if ($PSBoundParameters.ContainsKey('PublicTemplateLocale')) {
$cmdArgs.Add('PublicTemplateLocale', $PublicTemplateLocale)
}
$templates = Get-CsTeamTemplateList @cmdArgs | Sort-Object Name
if ($null -eq $templates -or $templates.Count -eq 0) {
Write-Output "No team templates found"
return
}
foreach ($itm in $templates) {
[PSCustomObject]@{
Timestamp = Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
Value = $itm.OdataId
DisplayValue = $itm.Name
}
}
}
catch { throw }
}The language and country code of templates localization