From 120ed011b5526acca75e74dbc3910c23b18b7661 Mon Sep 17 00:00:00 2001 From: Joel Mislav Kunst <7sedam7@gmail.com> Date: Thu, 16 Oct 2025 18:20:21 +0300 Subject: [PATCH] Added ResourceAccount parameter to the docs --- .../New-CsInboundBlockedNumberPattern.md | 28 +++++++++++++++++-- .../Set-CsInboundBlockedNumberPattern.md | 24 +++++++++++++++- .../Test-CsInboundBlockedNumberPattern.md | 12 ++++++++ 3 files changed, 60 insertions(+), 4 deletions(-) diff --git a/teams/teams-ps/MicrosoftTeams/New-CsInboundBlockedNumberPattern.md b/teams/teams-ps/MicrosoftTeams/New-CsInboundBlockedNumberPattern.md index 39ac70988a..b735cf0a5a 100644 --- a/teams/teams-ps/MicrosoftTeams/New-CsInboundBlockedNumberPattern.md +++ b/teams/teams-ps/MicrosoftTeams/New-CsInboundBlockedNumberPattern.md @@ -20,18 +20,18 @@ Adds a blocked number pattern to the tenant list. ### Identity (Default) ``` -New-CsInboundBlockedNumberPattern [-Identity] -Pattern [-Description ] [-Enabled ] +New-CsInboundBlockedNumberPattern [-Identity] -Pattern [-ResourceAccount ] [-Description ] [-Enabled ] [-WhatIf] [-Confirm] [] ``` ### ParentAndRelativeKey ``` -New-CsInboundBlockedNumberPattern -Pattern -Name [-Description ] [-Enabled ] +New-CsInboundBlockedNumberPattern -Pattern -Name [-ResourceAccount ] [-Description ] [-Enabled ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -This cmdlet adds a blocked number pattern to the tenant list. An inbound PSTN call from a number that matches the blocked number pattern will be blocked. +This cmdlet adds a blocked number pattern to the tenant list. An inbound PSTN call from a number that matches the blocked number pattern will be blocked. If a ResourceAccount is specified, the call will be redirected to that resource account instead of being blocked. ## EXAMPLES @@ -42,6 +42,13 @@ PS> New-CsInboundBlockedNumberPattern -Description "Avoid Unwanted Automatic Cal This example adds a blocked number pattern to block inbound calls from +11234567890 number. +### Example 2 +```powershell +PS> New-CsInboundBlockedNumberPattern -Description "Avoid Unwanted Automatic Call" -Name "BlockAutomatic" -Pattern "^\+11234567890" -ResourceAccount "d290f1ee-6c54-4b01-90e6-d701748f0851" +``` + +This example adds a blocked number pattern to redirect inbound calls from +11234567890 number to the specified resource account instead of blocking it. + ## PARAMETERS ### -Confirm @@ -134,6 +141,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ResourceAccount +The GUID of a resource account to redirect calls to when the pattern matches. If specified, matched calls will be redirected to this resource account instead of being blocked. + +```yaml +Type: Guid +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -WhatIf Shows what would happen if the cmdlet runs. The cmdlet is not run. diff --git a/teams/teams-ps/MicrosoftTeams/Set-CsInboundBlockedNumberPattern.md b/teams/teams-ps/MicrosoftTeams/Set-CsInboundBlockedNumberPattern.md index 5d6b3e2e5d..4667cc8077 100644 --- a/teams/teams-ps/MicrosoftTeams/Set-CsInboundBlockedNumberPattern.md +++ b/teams/teams-ps/MicrosoftTeams/Set-CsInboundBlockedNumberPattern.md @@ -20,7 +20,7 @@ Modifies one or more parameters of a blocked number pattern in the tenant list. ### Identity (Default) ``` -Set-CsInboundBlockedNumberPattern [[-Identity] ] [-Description ] [-Enabled ] [-Pattern ] +Set-CsInboundBlockedNumberPattern [[-Identity] ] [-Description ] [-Enabled ] [-Pattern ] [-ResourceAccount ] [-WhatIf] [-Confirm] [] ``` @@ -36,6 +36,13 @@ PS> Set-CsInboundBlockedNumberPattern -Identity "BlockAutomatic" -Pattern "^\+11 This example modifies a blocked number pattern to block inbound calls from +11234567890 number. +### Example 2 +```powershell +PS> Set-CsInboundBlockedNumberPattern -Identity "BlockAutomatic" -ResourceAccount "d290f1ee-6c54-4b01-90e6-d701748f0851" +``` + +This example modifies a blocked number pattern to redirect inbound calls from its pattern number to the specified resource account instead of blocking it. + ## PARAMETERS ### -Confirm @@ -113,6 +120,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ResourceAccount +The GUID of a resource account to redirect calls to when the pattern matches. If specified, matched calls will be redirected to this resource account instead of being blocked. + +```yaml +Type: Guid +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -WhatIf Shows what would happen if the cmdlet runs. The cmdlet is not run. diff --git a/teams/teams-ps/MicrosoftTeams/Test-CsInboundBlockedNumberPattern.md b/teams/teams-ps/MicrosoftTeams/Test-CsInboundBlockedNumberPattern.md index 166872828e..c09dc9dd43 100644 --- a/teams/teams-ps/MicrosoftTeams/Test-CsInboundBlockedNumberPattern.md +++ b/teams/teams-ps/MicrosoftTeams/Test-CsInboundBlockedNumberPattern.md @@ -14,6 +14,9 @@ title: Test-CsInboundBlockedNumberPattern ## SYNOPSIS This cmdlet tests the given number against the created (by using New-CsInboundBlockedNumberPattern cmdlet) blocked numbers pattern. +Cmdlet will return an object with two properties: +- IsMatch: True if the given number matches any of the blocked number patterns, otherwise False +- ResourceAccount: If the matched blocked number pattern has a ResourceAccount assigned, it will return the ResourceAccount Guid, otherwise null. ## SYNTAX @@ -109,6 +112,15 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS ### System.Object +An object with two properties: +- IsMatch: True if the given number matches any of the blocked number patterns, otherwise False +- ResourceAccount: If the matched blocked number pattern has a ResourceAccount assigned, it will return the ResourceAccount Guid, otherwise null. +``` +{ + "IsMatch": true, + "ResourceAccount": "00000000-0000-0000-0000-000000000000" +} +``` ## NOTES