Kaffeeundcode

Find TeamsAutoAttendantsWithoutAfterHoursCallFlow

Update: 14.04.2026

Skript Beschreibung

**Zusammenfassung**: Teams Auto Attendants Without After Hours Call Flow

Identifiziert Teams Auto Attendants Without After Hours Call Flow in der Teams-Telefonie.

Skript Infos

Autor Mattia Cirillo
Version 1.0
Sprache PowerShell
231_Find-TeamsAutoAttendantsWithoutAfterHoursCallFlow.ps1
<#
.SYNOPSIS
    Teams Auto Attendants Without After Hours Call Flow

.DESCRIPTION
    Identifiziert Teams Auto Attendants Without After Hours Call Flow in der Teams-Telefonie.

.NOTES
    File Name : 231_Find-TeamsAutoAttendantsWithoutAfterHoursCallFlow.ps1
    Author    : Kaffeeundcode
    Version   : 1.0
#>

param(
    [string]$OutputPath = "$PSScriptRoot/231_Find-TeamsAutoAttendantsWithoutAfterHoursCallFlow.csv",
    [int]$Top = 25,
    [switch]$SkipConnect
)

. "$PSScriptRoot/000_TeamsTelephonyHelper.ps1"

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

$PropertyMap = ([ordered]@{
    Name = "Name"
    LanguageId = "LanguageId"
    VoiceResponseEnabled = "VoiceResponseEnabled"
    ResourceAccountCount = "ResourceAccountIds.Count"
    ScheduleCount = "Schedules.Count"
    CallFlowCount = "CallFlows.Count"
    OperatorId = "Operator.Id"
})


$Items = @(Get-CsAutoAttendant)

$Items = Where-TtMissingValue -Items $Items -Path "AfterHoursCallFlow.Id"

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

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

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