From 80b6434af935b0de1be52ffbe0697186deaf1474 Mon Sep 17 00:00:00 2001 From: pavellatif <142821210+pavellatif@users.noreply.github.com> Date: Tue, 4 Nov 2025 13:43:29 -0500 Subject: [PATCH 1/3] Adding a new cmdlet to bulk update telephone number tags and related examples --- .../Get-CsOnlineTelephoneNumberOrder.md | 29 ++++ .../New-CsPhoneNumberBulkUpdateTagsOrder.md | 150 ++++++++++++++++++ .../Remove-CsPhoneNumberAssignmentBlock.md | 2 +- .../Set-CsPhoneNumberAssignmentBlock.md | 3 +- 4 files changed, 182 insertions(+), 2 deletions(-) create mode 100644 teams/teams-ps/MicrosoftTeams/New-CsPhoneNumberBulkUpdateTagsOrder.md diff --git a/teams/teams-ps/MicrosoftTeams/Get-CsOnlineTelephoneNumberOrder.md b/teams/teams-ps/MicrosoftTeams/Get-CsOnlineTelephoneNumberOrder.md index b11dbfd998..f0136616f2 100644 --- a/teams/teams-ps/MicrosoftTeams/Get-CsOnlineTelephoneNumberOrder.md +++ b/teams/teams-ps/MicrosoftTeams/Get-CsOnlineTelephoneNumberOrder.md @@ -160,6 +160,35 @@ SuccessPhoneNumbers {+99999980} This example returns the status of a successful upload order for a Direct Routing phone number. +### Example 6 +```powershell +PS C:\> $results = Get-CsOnlineTelephoneNumberOrder -OrderId acf9d459-083b-4f8e-b365-c0a07817b879 -OrderType NumberUpdate + +Key Value +--- ----- +OrderId 4b9cbc43-5bd5-4740-9e76-9a5762380f9d +CreatedAt 2025-10-30T00:22:59.4989508+00:00 +Status PartialSuccess +TotalCount 4 +SuccessCount 3 +FailureCount 1 +WarningCount 0 +SuccessPhoneNumbers {+12345678910, +1253489001, +14579824781} +FailedPhoneNumbers {+100001} +WarningPhoneNumbers {} +AdditionalDetails {System.Collections.Generic.Dictionary`2[System.String,System.Object]} + +PS C:\> $results.AdditionalDetails + +Key Value +--- ----- +TelephoneNumber +100001 +Status Error +Message The Number is not found. +``` + +This example returns the status of a partially successful NumberUpdate order for a telehpne number tags. + ## PARAMETERS ### -OrderId diff --git a/teams/teams-ps/MicrosoftTeams/New-CsPhoneNumberBulkUpdateTagsOrder.md b/teams/teams-ps/MicrosoftTeams/New-CsPhoneNumberBulkUpdateTagsOrder.md new file mode 100644 index 0000000000..18b55139cc --- /dev/null +++ b/teams/teams-ps/MicrosoftTeams/New-CsPhoneNumberBulkUpdateTagsOrder.md @@ -0,0 +1,150 @@ +--- +applicable: Microsoft Teams +author: pavellatif +external help file: Microsoft.Teams.ConfigAPI.Cmdlets-help.xml +Locale: en-US +manager: roykuntz +Module Name: MicrosoftTeams +ms.author: pavellatif +ms.reviewer: pavellatif +online version: https://learn.microsoft.com/powershell/module/teams/new-phonenumberbulkupdatetagsorder +schema: 2.0.0 +title: New-CsPhoneNumberBulkUpdateTagsOrder +--- + +# New-CsPhoneNumberBulkUpdateTagsOrder + +## SYNOPSIS + +This cmdlet allows the admin to add/remove one or multiple telephone number tags to a number of telephone numbers at once. + +## SYNTAX + +``` +New-CsPhoneNumberBulkUpdateTagsOrder [-TagsToAdd ] [-TagsToRemove ] + [-PhoneNumbers ] [] +``` + +## DESCRIPTION + +Creates a bulk update order that adds or removes one or more tags from multiple telephone numbers in a single operation. This cmdlet is designed for administrators who need to efficiently manage telephone numbers at scale, reducing manual effort and ensuring consistency across large sets of telephone numbers. The cmdlet allows maximum 1000 telephone numbers to be updated at a time. Any limitation for [Set-CsPhoneNumberTag](./Set-CsPhoneNumberTag.md) will also apply to this bulk update order. + +## EXAMPLES + +### Example 1 + +```powershell +PS C:\> New-CsPhoneNumberBulkUpdateTagsOrder -PhoneNumbers "17032511428,17032511429,17032511430" -TagsToAdd "HR" +``` +```output +Id OrderType +-- --------- +0e923e2c-ab0e-6h8c-be5a-a6gh3rf NumberUpdate +``` +Above example shows how to set a "HR" and "NewYork" tags to multiple telephone numbers. There can be maximum 1000 telephone numbers in one order. + +### Example 2 + +```powershell +PS C:\> New-CsPhoneNumberBulkUpdateTagsOrder -PhoneNumbers "17032511428,17032511429,17032511430" -TagsToRemove "HR" +``` +```output +Id OrderType +-- --------- +0e923e2c-ab0e-6h8c-be5a-wre45fd NumberUpdate +``` +Above example shows how to remove "HR" tag from multiple telephone numbers. There can be maximum 1000 telephone numbers in one order. + +### Example 3 + +```powershell +PS C:\> New-CsPhoneNumberBulkUpdateTagsOrder -PhoneNumbers "17032511428,17032511429,17032511430" -TagsToAdd "DevOps,London,City Center" +``` +```output +Id OrderType +-- --------- +0e923e2c-ab0e-6h8c-be5a-90fac6c NumberUpdate +``` +Above example shows how to add multiple tags to multiple telephone numbers at the same time. There can be maximum 1000 telephone numbers and 10 tags in one order. Any restrictions on number of tags per number and number of characters per tag will be enforced. + +### Example 4 + +```powershell +PS C:\> New-CsPhoneNumberBulkUpdateTagsOrder -PhoneNumbers "17032511428,17032511429,17032511430" -TagsToRemove "DevOps,London,City Center" +``` +```output +Id OrderType +-- --------- +0e923e2c-ab0e-6h8c-be5a-906be8c NumberUpdate +``` +Above example shows how to remove multiple tags from multiple telephone numbers at the same time. There can be maximum 1000 telephone numbers and 10 tags in one order. + +## PARAMETERS + +### -TagsToAdd + +These are the tags to be added to telephone numbers. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TagsToRemove + +These are the tags to be removed from telephone numbers. + + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PhoneNumbers + +These are the list of telephone numbers on which bulk update operation will be performed. + + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + + +### CommonParameters + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +The cmdlet is available in Teams PowerShell module 7.7.0 or later. + +## RELATED LINKS +- [Set-CsPhoneNumberTag](./Set-CsPhoneNumberTag.md) +- [Get-CsPhoneNumberTag](./Get-CsPhoneNumberTag.md) +- [Remove-CsPhoneNumberTag](./Remove-CsPhoneNumberTag.md) \ No newline at end of file diff --git a/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignmentBlock.md b/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignmentBlock.md index 7c5f64bd9c..6b06c95f36 100644 --- a/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignmentBlock.md +++ b/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignmentBlock.md @@ -65,5 +65,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### None ## NOTES - +This cmdlet is available in Teams PowerShell module 7.5.0 or later. ## RELATED LINKS diff --git a/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignmentBlock.md b/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignmentBlock.md index 6b5cbc7fe7..da20bbf933 100644 --- a/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignmentBlock.md +++ b/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignmentBlock.md @@ -28,7 +28,7 @@ This cmdlet allows the teams phone administrators to create and assign a tempora 1. Assignment is blocked until cleared. This can be set by -AssignmentBlockedForever parameter. Once set, the telephone number will remain unassignable until the block is cleared by an admin. 2. Assignment is blocked for a set number of days. This can be achieved by setting -AssignmentBlockedDays parameter (this value must be a valid integer between 1 and 365 days). Once set, the telephone number will remain unassignable until the time runs out or the block is cleared by an admin. ***The -AssignmentBlockedDays parameter is currently not available***. - The admin **cannot** set both -AssignmentBlockedForever and -AssignmentBlockedDays for the same number. If there is an existing assignment block on the number, the admin must remove the existing block using [Remove-CsPhoneNumberAssignmentBlock](https://learn.microsoft.com/powershell/module/teams/remove-csphonenumberassignmentblock) before proceeding with setting the new assignment block. + The admin **cannot** set both -AssignmentBlockedForever and -AssignmentBlockedDays for the same number. If there is an existing assignment block on the number, the admin must remove the existing block using [Remove-CsPhoneNumberAssignmentBlock](./remove-csphonenumberassignmentblock.md) before proceeding with setting the new assignment block. ## EXAMPLES @@ -106,5 +106,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### None ## NOTES +This cmdlet is available in Teams PowerShell module 7.5.0 or later. ## RELATED LINKS From fe1992f9807d1c30840b1c8136371766c26daa46 Mon Sep 17 00:00:00 2001 From: pavellatif <142821210+pavellatif@users.noreply.github.com> Date: Tue, 4 Nov 2025 13:48:27 -0500 Subject: [PATCH 2/3] Update MicrosoftTeams.md adding mention of New-CsPhoneNumberBulkUpdateTagsOrder --- teams/teams-ps/MicrosoftTeams/MicrosoftTeams.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/teams/teams-ps/MicrosoftTeams/MicrosoftTeams.md b/teams/teams-ps/MicrosoftTeams/MicrosoftTeams.md index df9481a55a..eef56c4ee8 100644 --- a/teams/teams-ps/MicrosoftTeams/MicrosoftTeams.md +++ b/teams/teams-ps/MicrosoftTeams/MicrosoftTeams.md @@ -893,6 +893,9 @@ Creates a new online voice route. ### [New-CsOnlineVoiceRoutingPolicy](New-CsOnlineVoiceRoutingPolicy.md) Creates a new online voice routing policy. Online voice routing policies manage online PSTN usages for Phone System users. +### [New-CsPhoneNumberBulkUpdateTagsOrder](New-CsPhoneNumberBulkUpdateTagsOrder.md) +Creates a new bulk update order for phone number tags. + ### [New-CsTeamsRemoteLogCollectionDevice](New-CsTeamsRemoteLogCollectionDevice.md) This cmdlet creates a request for remote log collection for a device. From 564574bfa7a1bd1c1593bc7de910106029f9e4a8 Mon Sep 17 00:00:00 2001 From: Ruchika Mittal Date: Wed, 5 Nov 2025 03:36:06 +0530 Subject: [PATCH 3/3] typo fix --- .../teams-ps/MicrosoftTeams/Get-CsOnlineTelephoneNumberOrder.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teams/teams-ps/MicrosoftTeams/Get-CsOnlineTelephoneNumberOrder.md b/teams/teams-ps/MicrosoftTeams/Get-CsOnlineTelephoneNumberOrder.md index f0136616f2..1289518285 100644 --- a/teams/teams-ps/MicrosoftTeams/Get-CsOnlineTelephoneNumberOrder.md +++ b/teams/teams-ps/MicrosoftTeams/Get-CsOnlineTelephoneNumberOrder.md @@ -187,7 +187,7 @@ Status Error Message The Number is not found. ``` -This example returns the status of a partially successful NumberUpdate order for a telehpne number tags. +This example returns the status of a partially successful NumberUpdate order for a telephone number tags. ## PARAMETERS