Edit

Share via


Set-CsPhoneNumberAssignmentBlock

This cmdlet allows the admin to create and assign a temporary block on telephone number assignment to selected telephone number.

Syntax

Default (Default)

Set-CsPhoneNumberAssignmentBlock
    -TelephoneNumber <String>
    [-AssignmentBlockedForever]
    [-AssignmentBlockedDays <Integer>]
    [<CommonParameters>]

Description

This cmdlet allows the teams phone administrators to create and assign a temporary block on telephone number assignment to selected telephone number. There are two ways to create the assignment block:

  1. Assignment is blocked until cleared. This can be set by -AssignmentBlockedForever parameter. Once set, the telephone number will remain unassignable until the block is cleared by an admin.
  2. Assignment is blocked for a set number of days. This can be achieved by setting -AssignmentBlockedDays parameter (this value must be a valid integer between 1 and 365 days). Once set, the telephone number will remain unassignable until the time runs out or the block is cleared by an admin. The -AssignmentBlockedDays parameter is currently not available.

The admin cannot set both -AssignmentBlockedForever and -AssignmentBlockedDays for the same number. If there is an existing assignment block on the number, the admin must remove the existing block using Remove-CsPhoneNumberAssignmentBlock before proceeding with setting the new assignment block.

Examples

Example 1

PS C:\> Set-CsPhoneNumberAssignmentBlock -TelephoneNumber +123456789 -AssignmentBlockedForever

The above example shows how to set an indefinite assignment block to a +123456789 number.

Example 2

PS C:\> Set-CsPhoneNumberAssignmentBlock -TelephoneNumber +123456789 -AssignmentBlockedDays 30

The above example shows how to set an assignment block to a +123456789 number for 30 days. This feature is currently not available.

Parameters

-AssignmentBlockedDays

Sets a duration based assignment block on the telephone number. This feature is currently not available.

Parameter properties

Type:System.Int32
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

-AssignmentBlockedForever

Sets an indefinite block on assignment for the telephone number.

Parameter properties

Type:System.Management.Automation.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

-TelephoneNumber

Indicates the phone number for the assignment block to be assigned.

Parameter properties

Type:System.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: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

None

Outputs

None