Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
205 changes: 150 additions & 55 deletions teams/teams-ps/teams/Get-CsOnlineTelephoneNumberOrder.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,82 +13,158 @@ ms.reviewer: julienp
# Get-CsOnlineTelephoneNumberOrder

## SYNOPSIS
Use the `Get-CsOnlineTelephoneNumberOrder` cmdlet to get the order report of a specific telephone number search order. The telephone numbers can then be used to set up calling features for users and services in your organization.
Use the `Get-CsOnlineTelephoneNumberOrder` cmdlet to get the order report of a specific telephone number order.


## SYNTAX

```
Get-CsOnlineTelephoneNumberOrder [-OrderId] <OrderId> [<CommonParameters>]
Get-CsOnlineTelephoneNumberOrder -OrderId <String> [-OrderType <String>]
[<CommonParameters>]
```

## DESCRIPTION

Use the `Get-CsOnlineTelephoneNumberOrder` cmdlet to get the order report of a specific telephone number search order. The telephone numbers can then be used to set up calling features for users and services in your organization.
This `Get-CsOnlineTelephoneNumberOrder` cmdlet can be used to get the status of specific telephone number orders. Currently supported orders for retrievals are: [New-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/new-csonlinetelephonenumberorder), [New-CsOnlineDirectRoutingTelephoneNumberUploadOrder](https://learn.microsoft.com/powershell/module/teams/New-CsOnlineDirectRoutingTelephoneNumberUploadOrder) and [New-CsOnlineTelephoneNumberReleaseOrder] (https://learn.microsoft.com/powershell/module/teams/New-CsOnlineTelephoneNumberReleaseOrder). When the OrderType is not indicated, the cmdlet will default to a Search order.


## EXAMPLES

### -------------------------- Example 1 --------------------------
### Example 1
```
PS C:\> $order = Get-CsOnlineTelephoneNumberOrder -OrderId 1efd85ca-dd46-41b3-80a0-2e4c5f87c912

AreaCode :
CivicAddressId :
CountryCode : US
CreatedAt : 8/23/2021 5:43:44 PM
Description : test
ErrorCode : NoError
Id : 1efd85ca-dd46-41b3-80a0-2e4c5f87c912
InventoryType : Subscriber
IsManual : False
Name : test
NumberPrefix : 1718
NumberType : UserSubscriber
Quantity : 1
ReservationExpiryDate : 8/23/2021 5:59:45 PM
SearchType : Prefix
SendToServiceDesk : False
Status : Reserved
TelephoneNumber : {Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.TelephoneNumberSearchResult}

PS C:\> $order.TelephoneNumber

Location TelephoneNumber
-------- ---------------
New York City +17182000004
PS C:\> $order = Get-CsOnlineTelephoneNumberOrder -OrderType Search -OrderId 1fd52b3b-b804-4ac4-a84d-4d70b51dd4be

Key Value
--- -----
Id 1fd52b3b-b804-4ac4-a84d-4d70b51dd4be
Name Postal Code Search Test
CreatedAt 2024-11-30T00:34:00.0825627+00:00
CreatedBy ContosoAdmin
Description Postal Code Search Test
NumberType UserSubscriber
SearchType PostalCode
AreaCode 778
PostalOrZipCode V7Y 1G5
Quantity 2
Status Reserved
IsManual False
TelephoneNumbers {System.Collections.Generic.Dictionary`2[System.String,System.Object], System.Collections.Generic.Dictionary`2[System.String,System.Object]}
ReservationExpiryDate 2024-11-30T00:50:01.1794152+00:00
ErrorCode NoError
InventoryType Subscriber
SendToServiceDesk False
CountryCode CA

PS C:\> $order.TelephoneNumbers

Key Value
--- -----
Location Vancouver
TelephoneNumber +16046606034
Location Vancouver
TelephoneNumber +16046606030
```

This example returns a successful telephone number search and the telephone number +17182000004 is reserved for purchase.
This example returns a successful telephone number search and the telephone numbers are reserved for purchase.

### -------------------------- Example 2 --------------------------
### Example 2
```
PS C:\> $order = Get-CsOnlineTelephoneNumberOrder -OrderId 8d23e073-bc98-4f73-8e05-7517655d7042

AreaCode :
CivicAddressId :
CountryCode : US
CreatedAt : 8/23/2021 6:53:12 PM
Description : test
ErrorCode : OutOfStock
Id : 8d23e073-bc98-4f73-8e05-7517655d7042
InventoryType : Subscriber
IsManual : False
Name : test
NumberPrefix : 1425
NumberType : UserSubscriber
Quantity : 1
ReservationExpiryDate :
SearchType : Prefix
SendToServiceDesk : False
Status : Error
TelephoneNumber : {}
Key Value
--- -----
Id 8d23e073-bc98-4f73-8e05-7517655d7042
Name Postal Code Search Test
CreatedAt 2024-11-30T00:34:00.0825627+00:00
CreatedBy ContosoAdmin
Description Prefix Search Test
NumberType UserSubscriber
SearchType Prefix
AreaCode
PostalOrZipCode
Quantity 1
Status Error
IsManual False
TelephoneNumbers {}
ReservationExpiryDate
ErrorCode OutOfStock
InventoryType Subscriber
SendToServiceDesk False
CountryCode
```

This example returns a failed telephone number search and the `ErrorCode` is showing that telephone numbers with `NumberPrefix: 1425` is `OutOfStock`.

### Example 3
```powershell
PS C:\> Get-CsOnlineTelephoneNumberOrder -OrderId 1fd52b3b-b804-4ac4-a84d-4d70b51dd4be

Key Value
--- -----
Id 1fd52b3b-b804-4ac4-a84d-4d70b51dd4be
Name Postal Code Search Test
CreatedAt 2024-11-30T00:34:00.0825627+00:00
CreatedBy TNM
Description Postal Code Search Test from Postman
NumberType UserSubscriber
SearchType PostalCode
AreaCode 778
PostalOrZipCode V7Y 1G5
Quantity 2
Status Expired
IsManual False
TelephoneNumbers {System.Collections.Generic.Dictionary`2[System.String,System.Object], System.Collections.Generic.Dictionary`2[System.String,System.Object]}
ReservationExpiryDate 2024-11-30T00:50:01.1794152+00:00
ErrorCode NoError
InventoryType Subscriber
SendToServiceDesk False
CountryCode CA
```

When the OrderType is not indicated, the cmdlet will default to a Search order. This example returns a successful telephone number search and the telephone numbers are reserved for purchase.

### Example 4
```powershell
PS C:\> Get-CsOnlineTelephoneNumberOrder -OrderType Release -OrderId 6aa4f786-8628-4923-9df1-896f3d84016c

Key Value
--- -----
OrderId 6aa4f786-8628-4923-9df1-896f3d84016c
CreatedAt 2024-11-27T06:44:26.1975766+00:00
Status Complete
TotalCount 3
SuccessCount 3
FailureCount 0
SuccessPhoneNumbers {+12063866355, +12063868075, +12063861642}
FailedPhoneNumbers {}
```

This example returns the status of a successful release order for Direct Routing telephone numbers.

### Example 5
```powershell
PS C:\> Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId faef09f7-5bd5-4740-9e76-9a5762380f34

Key Value
--- -----
OrderId faef09f7-5bd5-4740-9e76-9a5762380f34
CreatedAt 2024-11-30T00:22:59.4989508+00:00
Status Success
TotalCount 1
SuccessCount 1
FailureCount 0
WarningCount 0
FailedPhoneNumbers {}
WarningPhoneNumbers {}
SuccessPhoneNumbers {+99999980}
```

This example returns the status of a successful upload or telephone number creation order for a Direct Routing phone number.

## PARAMETERS

### OrderId
Specifies the telephone number search order to look up. Use `New-CsOnlineTelephoneNumberOrder` to create a search order to obtain a search order Id.
### -OrderId
Use the OrderId received as output of your order creation cmdlets.

```yaml
Type: String
Expand All @@ -102,21 +178,40 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -OrderType
Specifies the type of telephone number order to look up. Currently supported values are **Search**, **Release**, and **DirectRoutingNumberCreation**. If this value is unspecified, then it will default to a **Search** order.

```yaml
Type: String
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](https://go.microsoft.com/fwlink/?LinkID=113216).
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

## OUTPUTS

## NOTES
Updates in Teams PowerShell Module version 6.8.0 and later:
- A new optional parameter `OrderType` is introduced. If no OrderType is provided, it will default to a Search order.
- [BREAKING CHANGE] When a Search order is queried, the property name `TelephoneNumber` in the output will be changed to `TelephoneNumbers`. The structure of the `TelephoneNumbers` output will remain unchanged.
- Impact: Scripts and processes that reference the `TelephoneNumber` property will need to be updated to use `TelephoneNumbers`.

## RELATED LINKS

[Get-CsOnlineTelephoneNumberCountry](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumbercountry)
[Get-CsOnlineTelephoneNumberType](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumbercountry)

[New-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/new-csonlinetelephonenumberorder)
[Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/new-csonlinetelephonenumberorder)
[Complete-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/new-csonlinetelephonenumberorder)
[Clear-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/new-csonlinetelephonenumberorder)
[New-CsOnlineDirectRoutingTelephoneNumberUploadOrder](https://learn.microsoft.com/powershell/module/teams/New-CsOnlineDirectRoutingTelephoneNumberUploadOrder)
[New-CsOnlineTelephoneNumberReleaseOrder] (https://learn.microsoft.com/powershell/module/teams/New-CsOnlineTelephoneNumberReleaseOrder)
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
---
external help file: Microsoft.Teams.ConfigAPI.Cmdlets-help.xml
Module Name: Microsoft.Teams.ConfigAPI.Cmdlets
online version: https://learn.microsoft.com/powershell/module/teams/New-CsOnlineDirectRoutingTelephoneNumberUploadOrder
applicable: Microsoft Teams
title: New-CsOnlineDirectRoutingTelephoneNumberUploadOrder
author: pavellatif
ms.author: pavellatif
ms.reviewer:
manager: roykuntz
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.

## SYNTAX

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

## DESCRIPTION
This cmdlet uploads Direct Routing telephone numbers to Micorosoft 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 asynchronus operation and will return an OrderId as output. [Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder) cmdlet can be used to check the status of the OrderId including any error or warning message that may result from the operation.

## EXAMPLES

### Example 1
```powershell
PS C:\> New-CsOnlineDirectRoutingTelephoneNumberUploadOrder -TelephoneNumber "+123456789"
cdf3073a-6fbb-4ade-a8af-e8fa1f3b9c13
```

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

### Example 2
```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 [Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder) cmdlet to retrieve the status of the order.

## PARAMETERS

### -TelephoneNumber
This is the Direct Routing telephone number you wish to upload to Microsoft Teams telephone number management inventory.

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

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -StartingNumber
This is the starting number of a range of Direct Routing telephone number you wish to upload to Microsoft Teams telephone number management inventory.
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -EndingNumber
This is the ending number of a range of Direct Routing telephone number you wish to upload to Microsoft Teams telephone number management inventory.
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
Add a meaningful description that will help you identify the reason of this upload order.
```yaml
Type: String
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
### System.String
## 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](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder)
[New-CsOnlineTelephoneNumberReleaseOrder] (https://learn.microsoft.com/powershell/module/teams/New-CsOnlineTelephoneNumberReleaseOrder)
Loading
Loading