Test-CsInboundBlockedNumberPattern
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
Default (Default)
Test-CsInboundBlockedNumberPattern
-PhoneNumber <String>
[-TenantId <Guid>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
This cmdlet tests the given number against the created (by using New-CsInboundBlockedNumberPattern cmdlet) blocked numbers pattern.
Examples
Example 1
PS C:\> Test-CsInboundBlockedNumberPattern -PhoneNumber "321321321"
{
"IsMatch": true,
"ResourceAccount": "00000000-0000-0000-0000-000000000000"
}
Tests the "321321321" number to check if it will be blocked for inbound calls.
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 |
-PhoneNumber
The phone number to be tested.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-TenantId
This parameter is reserved for internal Microsoft use.
Parameter properties
| Type: | Guid |
| 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: | True |
| 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.
Inputs
System.String
System.Guid
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.