From 6a4727315fedc6a273f66972298a63727d67f61d Mon Sep 17 00:00:00 2001 From: pavellatif <142821210+pavellatif@users.noreply.github.com> Date: Thu, 20 Nov 2025 19:26:15 -0500 Subject: [PATCH 1/3] adding new cmdlets for Tenant Default Configuration on Telephone Numbers --- .../Get-CsPhoneNumberTenantConfiguration.md | 98 ++++++++++++ .../teams-ps/MicrosoftTeams/MicrosoftTeams.md | 9 ++ ...Remove-CsPhoneNumberTenantConfiguration.md | 140 +++++++++++++++++ .../Set-CsPhoneNumberTenantConfiguration.md | 146 ++++++++++++++++++ 4 files changed, 393 insertions(+) create mode 100644 teams/teams-ps/MicrosoftTeams/Get-CsPhoneNumberTenantConfiguration.md create mode 100644 teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberTenantConfiguration.md create mode 100644 teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberTenantConfiguration.md diff --git a/teams/teams-ps/MicrosoftTeams/Get-CsPhoneNumberTenantConfiguration.md b/teams/teams-ps/MicrosoftTeams/Get-CsPhoneNumberTenantConfiguration.md new file mode 100644 index 0000000000..7fbad74b91 --- /dev/null +++ b/teams/teams-ps/MicrosoftTeams/Get-CsPhoneNumberTenantConfiguration.md @@ -0,0 +1,98 @@ +--- +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/microsoftteams/get-csphonenumbertenantconfiguration +schema: 2.0.0 +title: Get-CsPhoneNumberTenantConfiguration +--- + +# Get-CsPhoneNumberTenantConfiguration + +## SYNOPSIS +This cmdlet displays existing tenant level telephone number default configurations. + +## SYNTAX + +``` +Get-CsPhoneNumberTenantConfiguration [] +``` + +## DESCRIPTION + +This cmdlet displays existing tenant level telephone number default configurations. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> Get-CsPhoneNumberTenantConfiguration +``` +```output +AssignmentEmailEnabled : True +UnassignmentEmailEnabled : True +AssignmentBlockedForever : +AssignmentBlockedDays : +AllowOnPremToOnlineMigration : +TenantId : 407c17ae-8c41-431e-894a-38787c682f68 +``` + +This example that email notifications are enabled for any telephone number assignment and unassignment operations. End users will receive an email about the change unless configuration is overridden during assignment or unassignment operations. + +### Example 2 +```powershell +PS C:\> Get-CsPhoneNumberTenantConfiguration +``` +```output +AssignmentEmailEnabled : False +UnassignmentEmailEnabled : False +AssignmentBlockedForever : True +AssignmentBlockedDays : +AllowOnPremToOnlineMigration : +TenantId : 407c17ae-8c41-431e-894a-38787c682f68 +``` + +This example displays that both email notifications and AssignmentBlockedForever is set by default. If a telephone number is unassigned, an email is sent to end user and the number is blocked from new assignment until the [block is manually removed](https://learn.microsoft.com/powershell/module/microsoftteams/remove-csphonenumberassignmentblock?view=teams-ps). + + +## PARAMETERS + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### None + +## OUTPUTS + +### AssignmentEmailEnabled + +Boolean stating if email notifications would be sent for telephone number assignment operations. + +### UnassignmentEmailEnabled + +Boolean stating if email notifications would be sent for telephone number unassignment operations. + +### AssignmentBlockedForever + +Boolean stating if assignment is blocked indefinitely. + +### AssignmentBlockedDays + +The number of days that assignment is blocked. + +### AllowOnPremToOnlineMigration + +Boolean stating if migrating Dirct Routing numbers from OnPremises to Online is supported. + +## NOTES + +## RELATED LINKS +- [Remove-CsPhoneNumberTenantConfiguration](https://learn.microsoft.com/powershell/module/microsoftteams/remove-csphonenumbertenantconfiguration) +- [Set-CsPhoneNumberTenantConfiguration](https://learn.microsoft.com/powershell/module/microsoftteams/set-csphonenumbertenantconfiguration) \ No newline at end of file diff --git a/teams/teams-ps/MicrosoftTeams/MicrosoftTeams.md b/teams/teams-ps/MicrosoftTeams/MicrosoftTeams.md index aa1d751215..7c23837f07 100644 --- a/teams/teams-ps/MicrosoftTeams/MicrosoftTeams.md +++ b/teams/teams-ps/MicrosoftTeams/MicrosoftTeams.md @@ -263,6 +263,9 @@ This cmdlet retrieves policy assignments associated with a specific telephone nu ### [Get-CsPhoneNumberTag](Get-CsPhoneNumberTag.md) This cmdlet allows the admin to get a list of existing tags for telephone numbers. +### [Get-CsPhoneNumberTenantConfiguration](Get-CsPhoneNumberTenantConfiguration.md) +This cmdlet displays existing tenant level telephone number default configurations. + ### [Get-CsPolicyPackage](Get-CsPolicyPackage.md) This cmdlet supports retrieving all the policy packages available on a tenant. @@ -1199,6 +1202,9 @@ This cmdlet allows the admin to remove an assignment block on a telephone number ### [Remove-CsPhoneNumberTag](Remove-CsPhoneNumberTag.md) This cmdlet allows admin to remove a tag from phone number. +### [Remove-CsPhoneNumberTenantConfiguration](Remove-CsPhoneNumberTenantConfiguration.md) +This cmdlet allows the admins to remove a tenant default configuration that applies to all telephone numbers within the tenant. + ### [Remove-CsTeamsRemoteLogCollectionDevice](Remove-CsTeamsRemoteLogCollectionDevice.md) This cmdlet will remove/delete a device from the remote log collection configuration. @@ -1514,6 +1520,9 @@ This cmdlet assigns a policy to a specific telephone number in Microsoft Teams. ### [Set-CsPhoneNumberTag](Set-CsPhoneNumberTag.md) This cmdlet allows the admin to create and assign a tag to a phone number. +### [Set-CsPhoneNumberTenantConfiguration](Set-CsPhoneNumberTenantConfiguration.md) +This cmdlet allows the admins to set a tenant default configuration that applies to all telephone numbers within the tenant. + ### [Set-CsTeamsRemoteLogCollectionDevice](Set-CsTeamsRemoteLogCollectionDevice.md) This cmdlet allows the admin to create and edit a device requested for remote log collection. diff --git a/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberTenantConfiguration.md b/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberTenantConfiguration.md new file mode 100644 index 0000000000..bd5cc3b9b9 --- /dev/null +++ b/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberTenantConfiguration.md @@ -0,0 +1,140 @@ +--- +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/microsoftteams/remove-csphonenumbertenantconfiguration +schema: 2.0.0 +title: Remove-CsPhoneNumberTenantConfiguration +--- + +# Remove-CsPhoneNumberTenantConfiguration + +## SYNOPSIS +This cmdlet allows the admins to remove a tenant default configuration that applies to all telephone numbers within the tenant. + +## SYNTAX + +``` +Remove-CsPhoneNumberTenantConfiguration [-AssignmentEmailEnabled] [-UnassignmentEmailEnabled] [-AssignmentBlockedForever] [-AssignmentBlockedDays] [-AllowOnPremToOnlineMigration] +[] +``` + +## DESCRIPTION + +This cmdlet allows the teams phone administrators to remove a tenant default configuration that applies to all the telephone numbers within the tenant. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> Remove-CsPhoneNumberTenantConfiguration -AssignmentEmailEnabled -UnassignmentEmailEnabled +``` + +The above example shows how to remove email notification configuration setting for all the telephone number assignment and unassignment operations within the tenant. + +### Example 2 +```powershell +PS C:\> Remove-CsPhoneNumberTenantConfiguration -AssignmentBlockedForever +``` + +The above example shows how to remove the indefinite assignment block configuration for all the telephone numbers within the tenant. + + +## PARAMETERS + +### -AssignmentEmailEnabled +Indicates the assignment email notification configuration will be removed. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UnassignmentEmailEnabled +Indicates the unassignment email notification configuration will be removed. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AssignmentBlockedForever +Indicates the assignment blocked forever configuration will be removed. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AssignmentBlockedDays +Indicates the assignment blocked days configuration will be removed. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AllowOnPremToOnlineMigration +Indicates the configuration will be removed for allowing OnPremises direct routing numbers to be automatically migrated to online direct routing numbers if an online operation is performed. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +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, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### None + +## OUTPUTS + +### None + +## NOTES + +## RELATED LINKS +- [Set-CsPhoneNumberTenantConfiguration](https://learn.microsoft.com/powershell/module/microsoftteams/set-csphonenumbertenantconfiguration) +- [Get-CsPhoneNumberTenantConfiguration](https://learn.microsoft.com/powershell/module/microsoftteams/get-csphonenumbertenantconfiguration) \ No newline at end of file diff --git a/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberTenantConfiguration.md b/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberTenantConfiguration.md new file mode 100644 index 0000000000..5ab68a543c --- /dev/null +++ b/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberTenantConfiguration.md @@ -0,0 +1,146 @@ +--- +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/microsoftteams/set-csphonenumbertenantconfiguration +schema: 2.0.0 +title: Set-CsPhoneNumberTenantConfiguration +--- + +# Set-CsPhoneNumberTenantConfiguration + +## SYNOPSIS +This cmdlet allows the admins to set a tenant default configuration that applies to all telephone numbers within the tenant. + +## SYNTAX + +``` +Set-CsPhoneNumberTenantConfiguration [-AssignmentEmailEnabled ] [-UnassignmentEmailEnabled ] [-AssignmentBlockedForever ] [-AssignmentBlockedDays ] [-AllowOnPremToOnlineMigration ] +[] +``` + +## DESCRIPTION + +This cmdlet sets the tenant-level default configuration for Teams Phone. The default settings automatically apply to all telephone numbers within the tenant, ensuring consistent behavior across the organization. If a specific number operation indicates its own configuration, that configuration takes precedence over the tenant default. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> Set-CsPhoneNumberTenantConfiguration -AssignmentEmailEnabled $true -UnassignmentEmailEnabled $true +``` + +The above example shows how to enable email notifications for all the telephone number assignment and unassignment operations within the tenant. Once set, any telephone number assignment or unassignment operation will send an automatic email to the end users notifying the change. + +### Example 2 +```powershell +PS C:\> Set-CsPhoneNumberTenantConfiguration -AssignmentBlockedForever $true +``` + +The above example shows how to set an indefinite assignment block to all the telephone numbers within the tenant. Once set, any telephone number unassignment operation will make the telephone number unavailable for assignment until the [block is manually removed](https://learn.microsoft.com/powershell/module/microsoftteams/remove-csphonenumberassignmentblock?view=teams-ps) by an admin. Note: AssignmentBlockedForever and AssignmentBlockedDays configurations are mutually exclusive. If one is set, the other one will not be available to be set at tenant configuration level. + +### Example 3 +```powershell +PS C:\> Set-CsPhoneNumberTenantConfiguration -AllowOnPremToOnlineMigration $false +``` + +The above example shows how to disallow OnPremises to Online Direct Routing (DR) number automatic migration. Once set, any online operation on a DR OnPremises number will not automatically convert it to Online DR number. If this configuration is set to False, only way to migrate an OnPremises DR number to Online DR number would be manually removing the number from OnPremises and manually adding the number to Online after DirSync. + +## PARAMETERS + +### -AssignmentEmailEnabled +Enables email notifications for all telephone number assignment operations. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UnassignmentEmailEnabled +Enables email notifications for all telephone number unassignment operations. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AssignmentBlockedForever +Sets an indefinite block on assignment for all the telephone numbers upon unassignment. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AssignmentBlockedDays +Sets a duration based assignment block on all the telephone numbers upon unassignment. ***This feature is currently not available.*** + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AllowOnPremToOnlineMigration +Allows Direct Routing numbers to be migrated from OnPremises to Online automatically. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +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, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### None + +## OUTPUTS + +### None + +## NOTES + +## RELATED LINKS +- [Remove-CsPhoneNumberTenantConfiguration](https://learn.microsoft.com/powershell/module/microsoftteams/remove-csphonenumbertenantconfiguration) +- [Get-CsPhoneNumberTenantConfiguration](https://learn.microsoft.com/powershell/module/microsoftteams/get-csphonenumbertenantconfiguration) \ No newline at end of file From bb740639025fe88f87d6d331542e9dfe7064ea1e Mon Sep 17 00:00:00 2001 From: Padma Jayaraman <176678503+padmagit77@users.noreply.github.com> Date: Fri, 21 Nov 2025 13:35:25 +0530 Subject: [PATCH 2/3] Tried to fix the broken link --- .../MicrosoftTeams/Get-CsPhoneNumberTenantConfiguration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teams/teams-ps/MicrosoftTeams/Get-CsPhoneNumberTenantConfiguration.md b/teams/teams-ps/MicrosoftTeams/Get-CsPhoneNumberTenantConfiguration.md index 7fbad74b91..a01d97f239 100644 --- a/teams/teams-ps/MicrosoftTeams/Get-CsPhoneNumberTenantConfiguration.md +++ b/teams/teams-ps/MicrosoftTeams/Get-CsPhoneNumberTenantConfiguration.md @@ -94,5 +94,5 @@ Boolean stating if migrating Dirct Routing numbers from OnPremises to Online is ## NOTES ## RELATED LINKS -- [Remove-CsPhoneNumberTenantConfiguration](https://learn.microsoft.com/powershell/module/microsoftteams/remove-csphonenumbertenantconfiguration) -- [Set-CsPhoneNumberTenantConfiguration](https://learn.microsoft.com/powershell/module/microsoftteams/set-csphonenumbertenantconfiguration) \ No newline at end of file +- [Remove-CsPhoneNumberTenantConfiguration](remove-csphonenumbertenantconfiguration) +- [Set-CsPhoneNumberTenantConfiguration](https://learn.microsoft.com/powershell/module/microsoftteams/set-csphonenumbertenantconfiguration) From b296d91f3850781b35b3a8f8b0bc9d147ce72dce Mon Sep 17 00:00:00 2001 From: padmagit77 <176678503+padmagit77@users.noreply.github.com> Date: Fri, 21 Nov 2025 14:16:29 +0530 Subject: [PATCH 3/3] Reapplied links --- .../MicrosoftTeams/Get-CsPhoneNumberTenantConfiguration.md | 7 ++++--- .../Remove-CsPhoneNumberTenantConfiguration.md | 5 +++-- .../MicrosoftTeams/Set-CsPhoneNumberTenantConfiguration.md | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/teams/teams-ps/MicrosoftTeams/Get-CsPhoneNumberTenantConfiguration.md b/teams/teams-ps/MicrosoftTeams/Get-CsPhoneNumberTenantConfiguration.md index a01d97f239..9a672ab302 100644 --- a/teams/teams-ps/MicrosoftTeams/Get-CsPhoneNumberTenantConfiguration.md +++ b/teams/teams-ps/MicrosoftTeams/Get-CsPhoneNumberTenantConfiguration.md @@ -89,10 +89,11 @@ The number of days that assignment is blocked. ### AllowOnPremToOnlineMigration -Boolean stating if migrating Dirct Routing numbers from OnPremises to Online is supported. +Boolean stating if migrating Direct Routing numbers from OnPremises to Online is supported. ## NOTES ## RELATED LINKS -- [Remove-CsPhoneNumberTenantConfiguration](remove-csphonenumbertenantconfiguration) -- [Set-CsPhoneNumberTenantConfiguration](https://learn.microsoft.com/powershell/module/microsoftteams/set-csphonenumbertenantconfiguration) + +- [Remove-CsPhoneNumberTenantConfiguration](Remove-CsPhoneNumberTenantConfiguration.md) +- [Set-CsPhoneNumberTenantConfiguration](Set-CsPhoneNumberTenantConfiguration.md) diff --git a/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberTenantConfiguration.md b/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberTenantConfiguration.md index bd5cc3b9b9..418e03551f 100644 --- a/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberTenantConfiguration.md +++ b/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberTenantConfiguration.md @@ -136,5 +136,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS -- [Set-CsPhoneNumberTenantConfiguration](https://learn.microsoft.com/powershell/module/microsoftteams/set-csphonenumbertenantconfiguration) -- [Get-CsPhoneNumberTenantConfiguration](https://learn.microsoft.com/powershell/module/microsoftteams/get-csphonenumbertenantconfiguration) \ No newline at end of file + +- [Set-CsPhoneNumberTenantConfiguration](Set-CsPhoneNumberTenantConfiguration.md) +- [Get-CsPhoneNumberTenantConfiguration](Get-CsPhoneNumberTenantConfiguration.md) \ No newline at end of file diff --git a/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberTenantConfiguration.md b/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberTenantConfiguration.md index 5ab68a543c..2d0f97b754 100644 --- a/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberTenantConfiguration.md +++ b/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberTenantConfiguration.md @@ -142,5 +142,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS -- [Remove-CsPhoneNumberTenantConfiguration](https://learn.microsoft.com/powershell/module/microsoftteams/remove-csphonenumbertenantconfiguration) -- [Get-CsPhoneNumberTenantConfiguration](https://learn.microsoft.com/powershell/module/microsoftteams/get-csphonenumbertenantconfiguration) \ No newline at end of file + +- [Remove-CsPhoneNumberTenantConfiguration](Remove-CsPhoneNumberTenantConfiguration.md) +- [Get-CsPhoneNumberTenantConfiguration](Get-CsPhoneNumberTenantConfiguration.md) \ No newline at end of file