Jump to content

Save Teams Tenant Config in csv files: Difference between revisions

From wiki.oeser.name
Udo (talk | contribs)
Created page with "Category: Powershell Script Examples ==Connect to Tenant== ==Get Dialplan including Normalization Rules== $dialPlans = Get-CsTenantDialPlan | ForEach-Object { $dialP..."
 
Udo (talk | contribs)
 
Line 1: Line 1:
[[Category: Powershell Script Examples]]
[[Category: Powershell Script Examples]]
==Connect to Tenant==
==Connect to Tenant==
Install-Module -Name PowerShellGet -Force -AllowClobber (if not there allready)
Install-Module -Name MicrosoftTeams -Force -AllowClobber (new install)
Connect-MicrosoftTeams
Update-Module MicrosoftTeams


==Get Dialplan including Normalization Rules==
==Get Dialplan including Normalization Rules==

Latest revision as of 16:23, 16 January 2024

Connect to Tenant

Install-Module -Name PowerShellGet -Force -AllowClobber (if not there allready)
Install-Module -Name MicrosoftTeams -Force -AllowClobber (new install)
Connect-MicrosoftTeams
Update-Module MicrosoftTeams

Get Dialplan including Normalization Rules

$dialPlans = Get-CsTenantDialPlan | ForEach-Object {
   $dialPlan = $_
   $_.NormalizationRules | ForEach-Object {
       [PSCustomObject]@{
           Identity = $dialPlan.Identity
           NormalizationRule = $_
       }
   }
}
$dialPlans | Export-Csv -Path Dialplan.csv -Delimiter ";"

Voice Routes

Get-CsOnlineVoiceRoute | Export-Csv -Path VoiceRoutes.csv -Delimiter ";"

Voice Routing Policies

Get-CsOnlineVoiceRoutingPolicy | Export-csv -path VoiceRoutePolicy.csv -Delimiter ";" 

Calling Policies

Get-CsTeamsCallingPolicy | Export-Csv -path CallingPolicy.csv -Append -Delimiter ";"  

Call Hold Policies

Get-CsTeamsCallHoldPolicy |  Export-Csv -path CallHoldPolicy.csv -Append -Delimiter ";" 

Call Park Policies

Get-CsTeamsCallParkPolicy | Export-Csv -path CallParkPolicy.csv -Append -Delimiter ";" 

Caller ID Policies

Get-CsCallingLineIdentity | Export-csv -path CallerIDPolicy.csv -Delimiter ";"

Emergency Policisies

Get-CsTeamsEmergencyCallingPolicy | Export-csv -path EmergencyPolicy.csv -Delimiter ";"

IP Phone Policies

Get-CsTeamsIPPhonePolicy | Export-csv -path IPPhonePolicy.csv -Delimiter ";"

Call Queues

Get-CsCallQueue | Export-Csv -path CallQueues.csv -Append -Delimiter ";"