Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## NOTES
The cmdlet is available in Teams PowerShell module 6.1.0 or later.
The cmdlet is only available in commercial and GCC cloud instances.
## RELATED LINKS
[Get-CsExportAcquiredPhoneNumberStatus](https://learn.microsoft.com/powershell/module/microsoftteams/get-csexportacquiredphonenumberstatus)
18 changes: 18 additions & 0 deletions teams/teams-ps/MicrosoftTeams/Get-CsPhoneNumberAssignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ PstnPartnerName : Microsoft
NumberSource : Online
ReverseNumberLookup : {}
Tag : {}
AssignmentBlockedState :
AssignmentBlockedUntil :
```
This example displays information about the Microsoft Calling Plan subscriber phone number +1 (402) 555-1234. You can see that it is assigned to a user.

Expand Down Expand Up @@ -114,6 +116,8 @@ PstnPartnerName :
NumberSource : OnPremises
ReverseNumberLookup : {}
Tag : {}
AssignmentBlockedState :
AssignmentBlockedUntil :
```
This example displays information about the Direct Routing phone number +1 (206) 555-1000;ext=524. You can see that it is assigned to a user.

Expand Down Expand Up @@ -186,6 +190,8 @@ PstnPartnerName :
NumberSource : OnPremises
ReverseNumberLookup : {SkipInternalVoip}
Tag : {}
AssignmentBlockedState :
AssignmentBlockedUntil :
```
This example displays when SkipInternalVoip option is turned on for a number.

Expand Down Expand Up @@ -215,6 +221,8 @@ PstnPartnerName :
NumberSource : OnPremises
ReverseNumberLookup : {}
Tag : {}
AssignmentBlockedState :
AssignmentBlockedUntil :
```
This example shows a way to use -Filter parameter to display information of a specific number.

Expand Down Expand Up @@ -244,6 +252,8 @@ PstnPartnerName :
NumberSource : OnPremises
ReverseNumberLookup : {}
Tag : {}
AssignmentBlockedState :
AssignmentBlockedUntil :
```
This example shows a way to get filtered results using multiple Filter parameters.

Expand Down Expand Up @@ -273,6 +283,8 @@ PstnPartnerName :
NumberSource : OnPremises
ReverseNumberLookup : {}
Tag : {Engineering}
AssignmentBlockedState :
AssignmentBlockedUntil :
```
This example shows a way to get filtered results using tags. Tags are not case sensitive.

Expand Down Expand Up @@ -710,6 +722,12 @@ The activation state of the telephone number.
### AssignedPstnTargetId
The ID of the object the phone number is assigned to, either the ObjectId of a user or resource account or the policy instance ID of a Teams shared calling routing policy instance.
### AssignmentBlockedState
The state of the number in terms of blocked assignment: NotBlocked if there is no assignment block on the number, BlockedForever if assignment is blocked indefinitely for the number, BlockedUntil if assignment is blocked for a specific amount of days (limited time assignment block currently not available).
### AssignmentBlockedUntil
The date until which assignment is blocked for the phone number. Null if the number is blocked for assignment indefinitely.
### AssignmentCategory
Contains the assignment category such as Primary or Private.
Expand Down
6 changes: 6 additions & 0 deletions teams/teams-ps/MicrosoftTeams/MicrosoftTeams.md
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,9 @@ Deletes an existing online voice routing policy. Online voice routing policies m
### [Remove-CsPhoneNumberAssignment](Remove-CsPhoneNumberAssignment.md)
This cmdlet will remove/unassign a phone number from a user or a resource account (online application instance).

### [Remove-CsPhoneNumberAssignmentBlock](Remove-CsPhoneNumberAssignmentBlock.md)
This cmdlet allows the admin to remove an assignment block on a telephone number.

### [Remove-CsPhoneNumberTag](Remove-CsPhoneNumberTag.md)
This cmdlet allows admin to remove a tag from phone number.

Expand Down Expand Up @@ -1487,6 +1490,9 @@ Use the `Set-CsOnlineVoiceUser` cmdlet to set the PSTN specific parameters (like
### [Set-CsPhoneNumberAssignment](Set-CsPhoneNumberAssignment.md)
This cmdlet will assign a phone number to a user or a resource account (online application instance).

### [Set-CsPhoneNumberAssignmentBlock](Set-CsPhoneNumberAssignmentBlock.md)
This cmdlet allows the admin to create and assign a temporary block on telephone number assignment to selected telephone number.

### [Set-CsPhoneNumberPolicyAssignment](Set-CsPhoneNumberPolicyAssignment.md)
This cmdlet assigns a policy to a specific telephone number in Microsoft Teams.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## NOTES
The cmdlet is available in Teams PowerShell module 6.7.1 or later.
The cmdlet is only available in commercial and GCC cloud instances.
## RELATED LINKS
[Get-CsOnlineTelephoneNumberOrder](./get-csonlinetelephonenumberorder.md)
[New-CsOnlineTelephoneNumberReleaseOrder](./new-csonlinetelephonenumberreleaseorder.md)
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

The cmdlet is available in Teams PowerShell module 6.7.1 or later.

The cmdlet is only available in commercial and GCC cloud instances.

## RELATED LINKS

[Get-CsOnlineTelephoneNumberOrder](get-csonlinetelephonenumberorder.md)
Expand Down
47 changes: 44 additions & 3 deletions teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This cmdlet will remove/unassign a phone number from a user or a resource accoun
### RemoveSome (Default)
```
Remove-CsPhoneNumberAssignment -Identity <String> -PhoneNumber <String> -PhoneNumberType <String>
[-HttpPipelinePrepend <SendAsyncStep[]>] [-Notify] [<CommonParameters>]
[-HttpPipelinePrepend <SendAsyncStep[]>] [-Notify] [-AssignmentBlockedForever] [-AssignmentBlockedDays <Integer>] [<CommonParameters>]
```

### RemoveAll
Expand Down Expand Up @@ -68,6 +68,18 @@ Remove-CsPhoneNumberAssignment -Identity [email protected] -RemoveAll -Notify
```
This example removes/unassigns all the telephone number from [email protected] and also sends an email notification to the user about the change.

### Example 5
```powershell
Remove-CsPhoneNumberAssignment -Identity [email protected] -PhoneNumber +12065551234 -AssignmentBlockedForever
```
This example removes a telephone number assignment from [email protected] and also sets an assignment block on the unassigned number for an indefinite duration.

### Example 6
```powershell
Remove-CsPhoneNumberAssignment -Identity [email protected] -PhoneNumber +12065551234 -AssignmentBlockedDays 30
```
This example removes a telephone number assignment from [email protected] and also sets an assignment block on the unassigned number for 30 days. Which means the telephone number will not be available for new assignment for 30 days or until the block is removed manually. The telephone number will automatically become available for assignment for 30 days period is over. ***This feature is currently not available.***

## PARAMETERS

### -HttpPipelinePrepend
Expand Down Expand Up @@ -161,6 +173,37 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -AssignmentBlockedForever
Sets an indefinite block on assignment for the telephone number.
```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AssignmentBlockedDays
Sets a duration based assignment block on the telephone number. The value must be a valid integer between 1 and 365. ***This feature is currently not available.***
```yaml
Type: System.Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
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).
Expand All @@ -175,8 +218,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## NOTES
The cmdlet is available in Teams PowerShell module 3.0.0 or later.
The cmdlet is only available in commercial and GCC cloud instances.
## RELATED LINKS
[Set-CsPhoneNumberAssignment](https://learn.microsoft.com/powershell/module/microsoftteams/set-csphonenumberassignment)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
applicable: Microsoft Teams
author: pavellatif
external help file: Microsoft.Teams.ConfigAPI.Cmdlets-help.xml
Locale: en-US
manager: roykuntz
Module Name: MicrosoftTeams
ms.author: pavellatif
ms.reviewer: pavellatif
online version: https://learn.microsoft.com/powershell/module/teams/remove-csphonenumberassignmentblock
schema: 2.0.0
title: Remove-CsPhoneNumberAssignmentBlock
---


# Remove-CsPhoneNumberAssignmentBlock

## SYNOPSIS
This cmdlet allows the admin to remove an assignment block on a telephone number.

## SYNTAX
```
Remove-CsPhoneNumberAssignmentBlock -TelephoneNumber <String> [<CommonParameters>]
```

## DESCRIPTION
This cmdlet allows telephone number administrators to remove an existing assignment block on a telephone number.

## EXAMPLES

### Example 1
```powershell
PS C:\> Remove-CsPhoneNumberAssignmentBlock -TelephoneNumber +123456789
```

The above example shows how to remove the assignment block on a +123456789 number.

## PARAMETERS

### -TelephoneNumber
Indicates the phone number for the assignment block be removed from.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
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).
## INPUTS
### None
## OUTPUTS
### None
## NOTES
## RELATED LINKS
110 changes: 110 additions & 0 deletions teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignmentBlock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
applicable: Microsoft Teams
author: pavellatif
external help file: Microsoft.Teams.ConfigAPI.Cmdlets-help.xml
Locale: en-US
manager: roykuntz
Module Name: MicrosoftTeams
ms.author: pavellatif
ms.reviewer: pavellatif
online version: https://learn.microsoft.com/powershell/module/teams/set-csphonenumberassignmentblock
schema: 2.0.0
title: Set-CsPhoneNumberAssignmentBlock
---

# Set-CsPhoneNumberAssignmentBlock

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

## SYNTAX

```
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](https://learn.microsoft.com/powershell/module/teams/remove-csphonenumberassignmentblock) before proceeding with setting the new assignment block.

## EXAMPLES

### Example 1
```powershell
PS C:\> Set-CsPhoneNumberAssignmentBlock -TelephoneNumber +123456789 -AssignmentBlockedForever
```

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

### Example 2
```powershell
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

### -TelephoneNumber
Indicates the phone number for the assignment block to be assigned.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AssignmentBlockedForever
Sets an indefinite block on assignment for the telephone number.
```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AssignmentBlockedDays
Sets a duration based assignment block on the telephone number. ***This feature is currently not available.***
```yaml
Type: System.Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
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).
## INPUTS
### None
## OUTPUTS
### None
## NOTES
## RELATED LINKS