Set-CsTenantBlockedCallingNumbers
Use the Set-CsTenantBlockedCallingNumbers cmdlet to set tenant blocked calling numbers setting.
Syntax
Default (Default)
Set-CsTenantBlockedCallingNumbers
[[-Identity] <String>]
[-Confirm]
[-Enabled <Object>]
[-Force]
[-InboundBlockedNumberPatterns <Object>]
[-InboundExemptNumberPatterns <Object>]
[-Instance <Object>]
[-Name <Object>]
[-Tenant <Object>]
[-WhatIf]
[<CommonParameters>]
Description
Microsoft Direct Routing, Operator Connect and Calling Plans supports blocking of inbound calls from the public switched telephone network (PSTN). This feature allows a tenant-global list of number patterns to be defined so that the caller ID of every incoming PSTN call to the tenant can be checked against the list for a match. If a match is made, an incoming call is rejected.
The tenant blocked calling numbers includes a list of inbound blocked number patterns. Number patterns are managed through the CsInboundBlockedNumberPattern commands New, Get, Set, and Remove. You can manage a given pattern by using these cmdlets, including the ability to toggle the activation of a given pattern.
The tenant blocked calling numbers also includes a list of number patterns exempt from call blocking. Exempt number patterns are managed through the CsInboundExemptNumberPattern commands New, Get, Set, and Remove. You can manage a given pattern by using these cmdlets, including the ability to toggle the activation of a given pattern.
You can test your number blocking by using the Test-CsInboundBlockedNumberPattern command.
The scope of tenant blocked calling numbers is global across the given tenant. This command-let can also turn on/off the blocked calling numbers setting at the tenant level.
To get the current tenant blocked calling numbers setting, use Get-CsTenantBlockedCallingNumbers
Examples
Example 1
Set-CsTenantBlockedCallingNumbers -Enabled $false
This example turns off the tenant blocked calling numbers setting. No inbound number will be blocked from this feature.
Example 2
Set-CsTenantBlockedCallingNumbers -Enabled $true
This example turns on the tenant blocked calling numbers setting. Inbound calls will be blocked based on the list of blocked number patterns.
Example 3
Set-CsTenantBlockedCallingNumbers -Name "MyCustomBlockedCallingNumbersName"
This example renames the current blocked calling numbers with "MyCustomBlockedCallingNumbersName". No change is made besides the Name field change.
Example 4
Set-CsTenantBlockedCallingNumbers -InboundBlockedNumberPatterns @((New-CsInboundBlockedNumberPattern -Name "AnonymousBlockedPattern" -Enabled $true -Pattern "^(?!)Anonymous"))
This example sets the tenant blocked calling numbers with a new list of inbound blocked number patterns. There is a new InboundBlockedNumberPattern being created. The pattern name is "AnonymousBlockedPattern". The pattern is turned on. The pattern is a normalization rule which contains "Anonymous".
Note that if the current InboundBlockedNumberPatterns already contains a list of patterns while a new pattern needs to be created, this example will wipe out the existing patterns and only add the new one. Please save the current InboundBlockedNumberPatterns list before adding new patterns.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Enabled
The switch to turn on or turn off the blocked calling numbers setting.
Parameter properties
Type: | Object |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Force
The Force switch overrides the confirmation prompt displayed.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Identity
The Identity parameter is a unique identifier which identifies the TenantBlockedCallingNumbers to set.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 1 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-InboundBlockedNumberPatterns
The InboundBlockedNumberPatterns parameter contains the list of InboundBlockedNumberPatterns.
Parameter properties
Type: | Object |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-InboundExemptNumberPatterns
The InboundExemptNumberPatterns parameter contains the list of InboundExemptNumberPatterns.
Parameter properties
Type: | Object |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Instance
Allows you to pass a reference to an object to the cmdlet.
Parameter properties
Type: | Object |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
This parameter allows you to provide a name to the TenantBlockedCallingNumbers setting.
Parameter properties
Type: | Object |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Tenant
This parameter is reserved for internal Microsoft use.
Parameter properties
Type: | Object |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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.