Commands › Microsoft Teams

Set-CsPhoneNumberTag

Microsoft Teams MicrosoftTeams Set-*

This cmdlet allows the admin to create and assign a tag to a phone number.

Quick start script

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

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-CsPhoneNumberTag
$before | Format-List

# 3. Make the change
Set-CsPhoneNumberTag -PhoneNumber <String> -Tag <String>

# 4. Verify and diff
$after = Get-CsPhoneNumberTag
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-CsPhoneNumberTag -PhoneNumber <String> -Tag <String> [<CommonParameters>]

Parameters (2)

ParameterTypeRequiredWhat it controls
-PhoneNumber String yes Indicates the phone number for the the tag to be assigned
-Tag String yes Indicates the tag to be assigned or created.

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