|
| 1 | +--- |
| 2 | +external help file: Microsoft.Teams.ConfigAPI.Cmdlets-help.xml |
| 3 | +Module Name: Microsoft.Teams.ConfigAPI.Cmdlets |
| 4 | +online version: https://learn.microsoft.com/powershell/module/teams/set-csphonenumberassignmentblock |
| 5 | +applicable: Microsoft Teams |
| 6 | +title: Set-CsPhoneNumberAssignmentBlock |
| 7 | +author: pavellatif |
| 8 | +ms.author: pavellatif |
| 9 | +ms.reviewer: pavellatif |
| 10 | +manager: roykuntz |
| 11 | +schema: 2.0.0 |
| 12 | +--- |
| 13 | + |
| 14 | +# Set-CsPhoneNumberAssignmentBlock |
| 15 | + |
| 16 | +## SYNOPSIS |
| 17 | +This cmdlet allows the admin to create and assign a temporary block on telephone number assignment to selected telephone number. |
| 18 | + |
| 19 | +## SYNTAX |
| 20 | + |
| 21 | +``` |
| 22 | +Set-CsPhoneNumberAssignmentBlock -TelephoneNumber <String> [-AssignmentBlockedForever] [-AssignmentBlockedDays <Integer>] [<CommonParameters>] |
| 23 | +``` |
| 24 | + |
| 25 | +## DESCRIPTION |
| 26 | +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: |
| 27 | +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. |
| 28 | +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***. |
| 29 | + |
| 30 | + 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](https://learn.microsoft.com/powershell/module/teams/remove-csphonenumberassignmentblock) before proceeding with setting the new assignment block. |
| 31 | + |
| 32 | +## EXAMPLES |
| 33 | + |
| 34 | +### Example 1 |
| 35 | +```powershell |
| 36 | +PS C:\> Set-CsPhoneNumberAssignmentBlock -TelephoneNumber +123456789 -AssignmentBlockedForever |
| 37 | +``` |
| 38 | + |
| 39 | +The above example shows how to set an indefinite assignment block to a +123456789 number. |
| 40 | + |
| 41 | +### Example 2 |
| 42 | +```powershell |
| 43 | +PS C:\> Set-CsPhoneNumberAssignmentBlock -TelephoneNumber +123456789 -AssignmentBlockedDays 30 |
| 44 | +``` |
| 45 | + |
| 46 | +The above example shows how to set an assignment block to a +123456789 number for 30 days. ***This feature is currently not available.*** |
| 47 | + |
| 48 | +## PARAMETERS |
| 49 | + |
| 50 | +### -TelephoneNumber |
| 51 | +Indicates the phone number for the assignment block to be assigned. |
| 52 | + |
| 53 | +```yaml |
| 54 | +Type: System.String |
| 55 | +Parameter Sets: (All) |
| 56 | +Aliases: |
| 57 | + |
| 58 | +Required: True |
| 59 | +Position: Named |
| 60 | +Default value: None |
| 61 | +Accept pipeline input: False |
| 62 | +Accept wildcard characters: False |
| 63 | +``` |
| 64 | +
|
| 65 | +### -AssignmentBlockedForever |
| 66 | +Sets an indefinite block on assignment for the telephone number. |
| 67 | +
|
| 68 | +```yaml |
| 69 | +Type: System.Management.Automation.SwitchParameter |
| 70 | +Parameter Sets: (All) |
| 71 | +Aliases: |
| 72 | + |
| 73 | +Required: False |
| 74 | +Position: Named |
| 75 | +Default value: None |
| 76 | +Accept pipeline input: False |
| 77 | +Accept wildcard characters: False |
| 78 | +``` |
| 79 | +
|
| 80 | +### -AssignmentBlockedDays |
| 81 | +Sets a duration based assignment block on the telephone number. ***This feature is currently not available.*** |
| 82 | +
|
| 83 | +```yaml |
| 84 | +Type: System.Int32 |
| 85 | +Parameter Sets: (All) |
| 86 | +Aliases: |
| 87 | + |
| 88 | +Required: False |
| 89 | +Position: Named |
| 90 | +Default value: None |
| 91 | +Accept pipeline input: False |
| 92 | +Accept wildcard characters: False |
| 93 | +``` |
| 94 | +
|
| 95 | +
|
| 96 | +### CommonParameters |
| 97 | +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). |
| 98 | +
|
| 99 | +## INPUTS |
| 100 | +
|
| 101 | +### None |
| 102 | +
|
| 103 | +## OUTPUTS |
| 104 | +
|
| 105 | +### None |
| 106 | +
|
| 107 | +## NOTES |
| 108 | +
|
| 109 | +## RELATED LINKS |
0 commit comments