Commands › Microsoft Teams
Get-CsOnlineTelephoneNumber
Use the `Get-CsOnlineTelephoneNumber` to retrieve telephone numbers from the Business Voice Directory.
Quick start script
# Get-CsOnlineTelephoneNumber — 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-CsOnlineTelephoneNumber | Format-List
# 3. Export for evidence / drift tracking
Get-CsOnlineTelephoneNumber | Export-Clixml .\CsOnlineTelephoneNumber-$(Get-Date -Format yyyyMMdd).xml
Syntax
Get-CsOnlineTelephoneNumber [-ActivationState <String>] [-Assigned <MultiValuedProperty>] [-CapitalOrMajorCity <String>] [-DomainController <Fqdn>] [-ExpandLocation] [-Force] [-InventoryType <MultiValuedProperty>] [-IsNotAssigned] [-ResultSize <UInt32>] [-TelephoneNumber <String>] [-TelephoneNumberGreaterThan <String>] [-TelephoneNumberLessThan <String>] [-TelephoneNumberStartsWith <String>] [-Tenant <Guid>] [<CommonParameters>]
Parameters (14)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.