Commands › Microsoft Teams

Get-CsPhoneNumberPolicyAssignment

Microsoft Teams MicrosoftTeams Get-*

This cmdlet retrieves policy assignments associated with a specific telephone number or a list of telephone numbers in Microsoft Teams.

Quick start script

# Get-CsPhoneNumberPolicyAssignment — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-MicrosoftTeams -CertificateThumbprint $thumb -ApplicationId $appId -TenantId $tenantId

# 2. Run and inspect
Get-CsPhoneNumberPolicyAssignment | Format-List

# 3. Export for evidence / drift tracking
Get-CsPhoneNumberPolicyAssignment | Export-Clixml .\CsPhoneNumberPolicyAssignment-$(Get-Date -Format yyyyMMdd).xml

Syntax — 2 parameter sets

Policy assignment for individual telephone number

Get-CsPhoneNumberPolicyAssignment [-TelephoneNumber <String>]
 [<CommonParameters>]

Policy assignment for a list of numbers with specific policy

Get-CsPhoneNumberPolicyAssignment [-PolicyType <String>] [-PolicyName <String>] [-ResultSize <Int32>]
 [<CommonParameters>]

Parameters (4)

ParameterTypeRequiredWhat it controls
-TelephoneNumber String Specifies the telephone number to query.
-PolicyType String Filters results by the type of policy assigned (e.g., TenantDialPlan, CallingLineIdentity etc.).
-PolicyName String Filters results by the name of the policy. To use this parameter, `-PolicyType` must also be specified.
-ResultSize Int32 Limits the number of telephone numbers returned in the results.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.