Skip to content
Merged
84 changes: 78 additions & 6 deletions teams/teams-ps/teams/Get-CsPhoneNumberAssignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This cmdlet displays information about one or more phone numbers.
### Assignment (Default)
```powershell
Get-CsPhoneNumberAssignment [-ActivationState <string>] [-AssignedPstnTargetId <string>] [-AssignmentCategory <string>]
[-CapabilitiesContain <string>] [-CivicAddressId <string>] [-IsoCountryCode <string>]
[-CapabilitiesContain <string>] [-CivicAddressId <string>] [-Filter <String>] [-IsoCountryCode <string>]
[-LocationId <string>] [-NetworkSiteId <string>] [-NumberType <string>] [-PstnAssignmentStatus <string>] [-Skip <int>] [-TelephoneNumber <string>]
[-TelephoneNumberContain <string>] [-TelephoneNumberGreaterThan <string>] [-TelephoneNumberLessThan <string>]
[-TelephoneNumberStartsWith <string>] [-Top <int>] [<CommonParameters>]
Expand All @@ -34,7 +34,7 @@ Returned results are sorted by TelephoneNumber in ascending order.

If you are using both -Skip X and -Top Y for filtering, the returned results will first be skipped by X, and then the top Y results will be returned.

By default, this cmdlet returns a maximum of 500 results.
By default, this cmdlet returns a maximum of 500 results. A maximum of 1000 results can be returned using -Top filter. If you need to get more than 1000 results, a combination of -Skip and -Top filtering can be used to list incremental returns of 1000 numbers. If a full list of telephone numbers acquired by the tenant is required, you can use [Export-CsAcquiredPhoneNumber](./export-csacquiredphonenumber.md) cmdlet to download a list of all acquired telephone numbers.

## EXAMPLES

Expand Down Expand Up @@ -132,15 +132,15 @@ This example returns the number of Calling Plan subscriber phone numbers that ar

### Example 9
```powershell
(Get-CsPhoneNumberAssignment | Where-Object {!$_.NumberType.Contains('DirectRouting') -and $_.Capability.Contains('VoiceApplicationAssignment') -and $_.Capability.Contains('ConferenceAssignment')}).Count
Get-CsPhoneNumberAssignment -Top (50::500)
```
This example returns the number of Calling Plan or Operator Connect service phone numbers that can be assigned to voice applications and conference bridges.
This example returns all phone numbers in the record between sequence 50 to 500. This parameter can be used to get upto a maximum 1000 results at a time.

### Example 10
```powershell
Get-CsPhoneNumberAssignment -Top ([int]::MaxValue)
Get-CsPhoneNumberAssignment -Skip 1000 -Top 1000
```
This example returns all phone numbers.
This example returns all phone numbers sequenced between 1001 to 2000 in the record of phone numbers.

### Example 11
```powershell
Expand Down Expand Up @@ -176,6 +176,63 @@ ReverseNumberLookup : {SkipInternalVoip}
```
This example displays when SkipInternalVoip option is turned on for a number.

### Example 13
```powershell
Get-CsPhoneNumberAssignment -Filter "TelephoneNumber -eq '+12065551000'"
```
```output
TelephoneNumber : +12065551000
OperatorId : 83d289bc-a4d3-41e6-8a3f-cff260a3f091
NumberType : DirectRouting
ActivationState : Activated
AssignedPstnTargetId : 2713551e-ed63-415d-9175-fc4ff825a0be
AssignmentCategory : Primary
Capability : {ConferenceAssignment, VoiceApplicationAssignment, UserAssignment}
City :
CivicAddressId : 00000000-0000-0000-0000-000000000000
IsoCountryCode :
IsoSubdivision :
LocationId : 00000000-0000-0000-0000-000000000000
LocationUpdateSupported : True
NetworkSiteId :
PortInOrderStatus :
PstnAssignmentStatus : UserAssigned
PstnPartnerId :
PstnPartnerName :
NumberSource : OnPremises
ReverseNumberLookup : {}
```
This example shows a way to use -Filter parameter to display information of a specific number.

### Example 14
```powershell
Get-CsPhoneNumberAssignment -Filter "TelephoneNumber -like '+12065551000' -and NumberType -eq 'DirectRouting'"
```
```output
TelephoneNumber : +12065551000
OperatorId : 83d289bc-a4d3-41e6-8a3f-cff260a3f091
NumberType : DirectRouting
ActivationState : Activated
AssignedPstnTargetId : 2713551e-ed63-415d-9175-fc4ff825a0be
AssignmentCategory : Primary
Capability : {ConferenceAssignment, VoiceApplicationAssignment, UserAssignment}
City :
CivicAddressId : 00000000-0000-0000-0000-000000000000
IsoCountryCode :
IsoSubdivision :
LocationId : 00000000-0000-0000-0000-000000000000
LocationUpdateSupported : True
NetworkSiteId :
PortInOrderStatus :
PstnAssignmentStatus : UserAssigned
PstnPartnerId :
PstnPartnerName :
NumberSource : OnPremises
ReverseNumberLookup : {}
```
This example shows a way to get filtered results using multiple Filter parameters.


## PARAMETERS

### -ActivationState
Expand Down Expand Up @@ -257,6 +314,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -Filter
This can be used to filter on one or more parameters within the search results.

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

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -IsoCountryCode
Filters the returned results based on the ISO 3166-1 Alpha-2 country code assigned to the phone number.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@ schema: 2.0.0
# New-CsOnlineDirectRoutingTelephoneNumberUploadOrder

## SYNOPSIS
This cmdlet creates a request to upload Direct Routing telephone numbers to Microsoft Teams telephone number management inventory. The output of the cmdlet is the "orderId" of the asynchronous Direct Routing Number creation operation.
This cmdlet creates a request to upload Direct Routing telephone numbers to Microsoft Teams telephone number management inventory. The output of the cmdlet is the "orderId" of the asynchronous Direct Routing Number creation operation. A maximum of 10,000 phone numbers can be uploaded at a time. If more than 10,000 numbers need to be uploaded, the requests should be divided into multiple increments of up to 10,000 numbers.

## SYNTAX

```
New-CsOnlineDirectRoutingTelephoneNumberUploadOrder [-TelephoneNumber <String>] [-StartingNumber <String>] [-EndingNumber <String>]
[-Description <String>] [<CommonParameters>]
New-CsOnlineDirectRoutingTelephoneNumberUploadOrder [-TelephoneNumber <String>] [-StartingNumber <String>] [-EndingNumber <String>] [-FileContent <Byte[]>] [<CommonParameters>]
```

## DESCRIPTION
This cmdlet uploads Direct Routing telephone numbers to Microsoft Teams telephone number management inventory. Once uploaded the phone numbers will be visible in Teams PowerShell as acquired Direct Routing phone numbers.

The cmdlet is an asynchronous operation and will return an OrderId as output. You can use the [Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder) cmdlet to check the status of the OrderId, including any error or warning messages that might result from the operation: `Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId "orderId"`.
The cmdlet is an asynchronous operation and will return an OrderId as output. You can use the [Get-CsOnlineTelephoneNumberOrder](./get-csonlinetelephonenumberorder.md) cmdlet to check the status of the OrderId, including any error or warning messages that might result from the operation: `Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId "orderId"`.

## EXAMPLES

Expand All @@ -36,23 +35,32 @@ PS C:\> New-CsOnlineDirectRoutingTelephoneNumberUploadOrder -TelephoneNumber "+1
cdf3073a-6fbb-4ade-a8af-e8fa1f3b9c13
```

In this example, a new Direct Routing telephone number "+123456789" is being uploaded to Microsoft Teams telephone number management inventory. The output of the cmdlet is the OrderId that can be used with the [Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder) cmdlet to retrieve the status of the order: `Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId "orderId"`.
In this example, a new Direct Routing telephone number "+123456789" is being uploaded to Microsoft Teams telephone number management inventory. The output of the cmdlet is the OrderId that can be used with the [Get-CsOnlineTelephoneNumberOrder](./get-csonlinetelephonenumberorder.md) cmdlet to retrieve the status of the order: `Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId "orderId"`.

### Example 2
```powershell
PS C:\> New-CsOnlineDirectRoutingTelephoneNumberUploadOrder -TelephoneNumber "+123456789,+134567890,+145678901"
cdf3073a-6fbb-4ade-a8af-e8fa1f3b9c14
```

In this example, a list of telephone numbers is being uploaded to Microsoft Teams telephone number management inventory. The output of the cmdlet is the OrderId that can be used with the [Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder) cmdlet to retrieve the status of the order: `Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId "orderId"`.
In this example, a list of telephone numbers is being uploaded to Microsoft Teams telephone number management inventory. The output of the cmdlet is the OrderId that can be used with the [Get-CsOnlineTelephoneNumberOrder](./get-csonlinetelephonenumberorder.md) cmdlet to retrieve the status of the order: `Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId "orderId"`.

### Example 3
```powershell
PS C:\> New-CsOnlineDirectRoutingTelephoneNumberUploadOrder -StartingNumber "+12000000" -EndingNumber "+12000009"
cdf3073a-6fbb-4ade-a8af-e8fa1f3b9c13
```

In this example, a range of Direct Routing telephone numbers from "+12000000" to "+12000009" are being uploaded to Microsoft Teams telephone number management inventory. The output of the cmdlet is the OrderId that can be used with the [Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder) cmdlet to retrieve the status of the order: `Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId "orderId"`.
In this example, a range of Direct Routing telephone numbers from "+12000000" to "+12000009" are being uploaded to Microsoft Teams telephone number management inventory. The output of the cmdlet is the OrderId that can be used with the [Get-CsOnlineTelephoneNumberOrder](./get-csonlinetelephonenumberorder.md) cmdlet to retrieve the status of the order: `Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId "orderId"`.

### Example 4
```powershell
PS C:\> $drlist = [System.IO.File]::ReadAllBytes("C:\Users\testuser\DrNumber.csv")
PS C:\> New-CsOnlineDirectRoutingTelephoneNumberUploadOrder -FileContent $drlist
cdf3073a-6fbb-4ade-a8af-e8fa1f3b9c19
```

In this example, the content of a file with a list of Direct Routing telephone numbers are being uploaded via file upload. The file should be in Comma Separated Values (CSV) file format and only containing the list of DR numbers. Only the content of the file can be passed to the New-CsOnlineDirectRoutingTelephoneNumberUploadOrder cmdlet. Additional fields will be supported via file upload in future releases. The output of the cmdlet is the OrderId that can be used with the [Get-CsOnlineTelephoneNumberOrder](./get-csonlinetelephonenumberorder.md) cmdlet to retrieve the status of the order: `Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId "orderId"`.

## PARAMETERS

Expand Down Expand Up @@ -101,11 +109,11 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -Description
Add a meaningful description that will help you identify the reason for this upload order.
### -FileContent
This is the content of a .csv file that includes the Direct Routing telephone numbers to be uploaded to the Microsoft Teams telephone number management inventory. This parameter can be used to upload up to 10,000 numbers at a time.

```yaml
Type: String
Type: Byte[]
Parameter Sets: (All)
Aliases:

Expand Down Expand Up @@ -133,5 +141,5 @@ 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](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder)
[New-CsOnlineTelephoneNumberReleaseOrder](https://learn.microsoft.com/powershell/module/teams/New-csonlinetelephonenumberreleaseorder)
[Get-CsOnlineTelephoneNumberOrder](./get-csonlinetelephonenumberorder.md)
[New-CsOnlineTelephoneNumberReleaseOrder](./new-csonlinetelephonenumberreleaseorder.md)
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ New-CsOnlineTelephoneNumberReleaseOrder [-TelephoneNumber <String>] [-StartingNu
## DESCRIPTION
This cmdlet releases existing Direct Routing telephone numbers from Microsoft Teams telephone number management inventory. Once released the phone numbers will not be visible in Teams PowerShell as acquired Direct Routing phone numbers.

The cmdlet is an asynchronous operation and will return an OrderId as output. You can use the [Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder) cmdlet to check the status of the OrderId, including any error or warning messages that might result from the operation: `Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId "orderId"`.
The cmdlet is an asynchronous operation and will return an OrderId as output. You can use the [Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder) cmdlet to check the status of the OrderId, including any error or warning messages that might result from the operation: `Get-CsOnlineTelephoneNumberOrder -OrderType Release -OrderId "orderId"`.

## EXAMPLES

Expand All @@ -35,23 +35,23 @@ PS C:\> New-CsOnlineTelephoneNumberReleaseOrder -TelephoneNumber "+123456789"
cdf3073a-6fbb-4ade-a8af-e8fa1f3b9c13
```

In this example, a new Direct Routing telephone number "+123456789" is being released from Microsoft Teams telephone number management inventory. The output of the cmdlet is the OrderId that can be used with the [Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder) cmdlet to retrieve the status of the order: `Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId "orderId"`.
In this example, a new Direct Routing telephone number "+123456789" is being released from Microsoft Teams telephone number management inventory. The output of the cmdlet is the OrderId that can be used with the [Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder) cmdlet to retrieve the status of the order: `Get-CsOnlineTelephoneNumberOrder -OrderType Release -OrderId "orderId"`.

### Example 2
```powershell
PS C:\> New-CsOnlineTelephoneNumberReleaseOrder -TelephoneNumber "+123456789,+134567890,+145678901"
cdf3073a-6fbb-4ade-a8af-e8fa1f3b9c13
```

In this example, a list of Direct Routing telephone numbers are being released from Microsoft Teams telephone number management. The output of the cmdlet is the OrderId that can be used with the [Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder) cmdlet to retrieve the status of the order: `Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId "orderId"`.
In this example, a list of Direct Routing telephone numbers are being released from Microsoft Teams telephone number management. The output of the cmdlet is the OrderId that can be used with the [Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder) cmdlet to retrieve the status of the order: `Get-CsOnlineTelephoneNumberOrder -OrderType Release -OrderId "orderId"`.

### Example 3
```powershell
PS C:\> New-CsOnlineTelephoneNumberReleaseOrder -StartingNumber "+12000000" -EndingNumber "+12000009"
cdf3073a-6fbb-4ade-a8af-e8fa1f3b9c13
```

In this example, a range of Direct Routing telephone numbers from "+12000000" to "+12000009" are being released from Microsoft Teams telephone number management. The output of the cmdlet is the OrderId that can be used with the [Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder) cmdlet to retrieve the status of the order: `Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId "orderId"`.
In this example, a range of Direct Routing telephone numbers from "+12000000" to "+12000009" are being released from Microsoft Teams telephone number management. The output of the cmdlet is the OrderId that can be used with the [Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder) cmdlet to retrieve the status of the order: `Get-CsOnlineTelephoneNumberOrder -OrderType Release -OrderId "orderId"`.

## PARAMETERS

Expand Down