Install-Module -Name MicrosoftTeams -RequiredVersion 5.6.0

New-CsInboundBlockedNumberPattern -Name "BlockNumber0416450519" -Enabled $True -Description "BlockAgent2" -Pattern "^\+?0416450519$"


confirm blocked numbers added with this command Get-CsInboundBlockedNumberPattern



PS C:\Windows\system32> Get-CsInboundBlockedNumberPattern

 

 

Identity    : BlockNumber0491842223
Name        : BlockNumber0491842223
Enabled     : True
Description : BlockAgent1
Pattern     : ^\+?0491842223$

 

Identity    : BlockNumber0416450519
Name        : BlockNumber0416450519
Enabled     : True
Description : BlockAgent2
Pattern     : ^\+?0416450519$