Kaffeeundcode

Get TeamsDialPlanOverview

Update: 14.04.2026

Skript Beschreibung

**Zusammenfassung**: Teams Dial Plan Overview

Ruft Teams Dial Plan Overview aus der Teams-Telefonie ab.

Skript Infos

Autor Mattia Cirillo
Version 1.0
Sprache PowerShell
282_Get-TeamsDialPlanOverview.ps1
<#
.SYNOPSIS
    Teams Dial Plan Overview

.DESCRIPTION
    Ruft Teams Dial Plan Overview aus der Teams-Telefonie ab.

.NOTES
    File Name : 282_Get-TeamsDialPlanOverview.ps1
    Author    : Kaffeeundcode
    Version   : 1.0
#>

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

. "$PSScriptRoot/000_TeamsTelephonyHelper.ps1"

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

$PropertyMap = ([ordered]@{
    Identity = "Identity"
    SimpleName = "SimpleName"
    Description = "Description"
    NormalizationRuleCount = "NormalizationRules.Count"
    ExternalAccessPrefix = "ExternalAccessPrefix"
    PstnUsageCount = "PstnUsages.Count"
})


$Items = @(Get-CsTenantDialPlan)

$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
}