Kaffeeundcode

Get TeamsCallingPolicies

Update: 14.04.2026

Skript Beschreibung

**Zusammenfassung**: Teams Calling Policies

Ruft Teams Calling Policies aus der Teams-Telefonie ab.

Skript Infos

Autor Mattia Cirillo
Version 1.0
Sprache PowerShell
177_Get-TeamsCallingPolicies.ps1
<#
.SYNOPSIS
    Teams Calling Policies

.DESCRIPTION
    Ruft Teams Calling Policies aus der Teams-Telefonie ab.

.NOTES
    File Name : 177_Get-TeamsCallingPolicies.ps1
    Author    : Kaffeeundcode
    Version   : 1.0
#>

param(
    [string]$OutputPath = "$PSScriptRoot/177_Get-TeamsCallingPolicies.csv",
    [int]$Top = 25,
    [switch]$SkipConnect
)

. "$PSScriptRoot/000_TeamsTelephonyHelper.ps1"

Ensure-TtCommand -Commands @("Get-CsTeamsCallingPolicy")
Initialize-TtSession -SkipConnect:$SkipConnect

$PropertyMap = ([ordered]@{
    Identity = "Identity"
    Description = "Description"
})


$Items = @(Get-CsTeamsCallingPolicy)

$Result = Select-TtProps -Items $Items -PropertyMap $PropertyMap

$Result = @($Result | Sort-Object Identity)

if ($OutputPath) {
    Export-TtData -Data $Result -OutputPath $OutputPath
    Write-Host "Export abgeschlossen: $OutputPath" -ForegroundColor Green
} else {
    Write-TtPreview -Data $Result -Top $Top
}