Skip to content

Commit 6f8ea53

Browse files
authored
Merge pull request MicrosoftDocs#12395 from pavellatif/main
Updated Get-CsOnlineTelephoneNumberOrder and new cmdlets for creating…
2 parents 3ea8070 + e4bc249 commit 6f8ea53

File tree

3 files changed

+391
-57
lines changed

3 files changed

+391
-57
lines changed

teams/teams-ps/teams/Get-CsOnlineTelephoneNumberOrder.md

Lines changed: 152 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -13,82 +13,158 @@ ms.reviewer: julienp
1313
# Get-CsOnlineTelephoneNumberOrder
1414

1515
## SYNOPSIS
16-
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.
16+
Use the `Get-CsOnlineTelephoneNumberOrder` cmdlet to get the order report of a specific telephone number order.
17+
1718

1819
## SYNTAX
1920

2021
```
21-
Get-CsOnlineTelephoneNumberOrder [-OrderId] <OrderId> [<CommonParameters>]
22+
Get-CsOnlineTelephoneNumberOrder -OrderId <String> [-OrderType <String>]
23+
[<CommonParameters>]
2224
```
2325

2426
## DESCRIPTION
2527

26-
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.
28+
This `Get-CsOnlineTelephoneNumberOrder` cmdlet can be used to get the status of specific telephone number orders. Currently supported orders for retrievals are: Search [New-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/new-csonlinetelephonenumberorder), Direct Routing Number Upload [New-CsOnlineDirectRoutingTelephoneNumberUploadOrder](https://learn.microsoft.com/powershell/module/teams/New-CsOnlineDirectRoutingTelephoneNumberUploadOrder), and Direct Routing Number Release [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.
29+
2730

2831
## EXAMPLES
2932

30-
### -------------------------- Example 1 --------------------------
33+
### Example 1
3134
```
32-
PS C:\> $order = Get-CsOnlineTelephoneNumberOrder -OrderId 1efd85ca-dd46-41b3-80a0-2e4c5f87c912
33-
34-
AreaCode :
35-
CivicAddressId :
36-
CountryCode : US
37-
CreatedAt : 8/23/2021 5:43:44 PM
38-
Description : test
39-
ErrorCode : NoError
40-
Id : 1efd85ca-dd46-41b3-80a0-2e4c5f87c912
41-
InventoryType : Subscriber
42-
IsManual : False
43-
Name : test
44-
NumberPrefix : 1718
45-
NumberType : UserSubscriber
46-
Quantity : 1
47-
ReservationExpiryDate : 8/23/2021 5:59:45 PM
48-
SearchType : Prefix
49-
SendToServiceDesk : False
50-
Status : Reserved
51-
TelephoneNumber : {Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.TelephoneNumberSearchResult}
52-
53-
PS C:\> $order.TelephoneNumber
54-
55-
Location TelephoneNumber
56-
-------- ---------------
57-
New York City +17182000004
35+
PS C:\> $order = Get-CsOnlineTelephoneNumberOrder -OrderType Search -OrderId 1fd52b3b-b804-4ac4-a84d-4d70b51dd4be
36+
37+
Key Value
38+
--- -----
39+
Id 1fd52b3b-b804-4ac4-a84d-4d70b51dd4be
40+
Name Postal Code Search Test
41+
CreatedAt 2024-11-30T00:34:00.0825627+00:00
42+
CreatedBy ContosoAdmin
43+
Description Postal Code Search Test
44+
NumberType UserSubscriber
45+
SearchType PostalCode
46+
AreaCode 778
47+
PostalOrZipCode V7Y 1G5
48+
Quantity 2
49+
Status Reserved
50+
IsManual False
51+
TelephoneNumbers {System.Collections.Generic.Dictionary`2[System.String,System.Object], System.Collections.Generic.Dictionary`2[System.String,System.Object]}
52+
ReservationExpiryDate 2024-11-30T00:50:01.1794152+00:00
53+
ErrorCode NoError
54+
InventoryType Subscriber
55+
SendToServiceDesk False
56+
CountryCode CA
57+
58+
PS C:\> $order.TelephoneNumbers
59+
60+
Key Value
61+
--- -----
62+
Location Vancouver
63+
TelephoneNumber +16046606034
64+
Location Vancouver
65+
TelephoneNumber +16046606030
5866
```
5967

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

62-
### -------------------------- Example 2 --------------------------
70+
### Example 2
6371
```
64-
PS C:\> $order = Get-CsOnlineTelephoneNumberOrder -OrderId 8d23e073-bc98-4f73-8e05-7517655d7042
65-
66-
AreaCode :
67-
CivicAddressId :
68-
CountryCode : US
69-
CreatedAt : 8/23/2021 6:53:12 PM
70-
Description : test
71-
ErrorCode : OutOfStock
72-
Id : 8d23e073-bc98-4f73-8e05-7517655d7042
73-
InventoryType : Subscriber
74-
IsManual : False
75-
Name : test
76-
NumberPrefix : 1425
77-
NumberType : UserSubscriber
78-
Quantity : 1
79-
ReservationExpiryDate :
80-
SearchType : Prefix
81-
SendToServiceDesk : False
82-
Status : Error
83-
TelephoneNumber : {}
72+
PS C:\> $order = Get-CsOnlineTelephoneNumberOrder -OrderType Search -OrderId 8d23e073-bc98-4f73-8e05-7517655d7042
73+
74+
Key Value
75+
--- -----
76+
Id 8d23e073-bc98-4f73-8e05-7517655d7042
77+
Name Postal Code Search Test
78+
CreatedAt 2024-11-30T00:34:00.0825627+00:00
79+
CreatedBy ContosoAdmin
80+
Description Prefix Search Test
81+
NumberType UserSubscriber
82+
SearchType Prefix
83+
AreaCode
84+
PostalOrZipCode
85+
Quantity 1
86+
Status Error
87+
IsManual False
88+
TelephoneNumbers {}
89+
ReservationExpiryDate
90+
ErrorCode OutOfStock
91+
InventoryType Subscriber
92+
SendToServiceDesk False
93+
CountryCode
8494
```
8595

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

98+
### Example 3
99+
```powershell
100+
PS C:\> Get-CsOnlineTelephoneNumberOrder -OrderId 1fd52b3b-b804-4ac4-a84d-4d70b51dd4be
101+
102+
Key Value
103+
--- -----
104+
Id 1fd52b3b-b804-4ac4-a84d-4d70b51dd4be
105+
Name Postal Code Search Test
106+
CreatedAt 2024-11-30T00:34:00.0825627+00:00
107+
CreatedBy TNM
108+
Description Postal Code Search Test from Postman
109+
NumberType UserSubscriber
110+
SearchType PostalCode
111+
AreaCode 778
112+
PostalOrZipCode V7Y 1G5
113+
Quantity 2
114+
Status Expired
115+
IsManual False
116+
TelephoneNumbers {System.Collections.Generic.Dictionary`2[System.String,System.Object], System.Collections.Generic.Dictionary`2[System.String,System.Object]}
117+
ReservationExpiryDate 2024-11-30T00:50:01.1794152+00:00
118+
ErrorCode NoError
119+
InventoryType Subscriber
120+
SendToServiceDesk False
121+
CountryCode CA
122+
```
123+
124+
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.
125+
126+
### Example 4
127+
```powershell
128+
PS C:\> Get-CsOnlineTelephoneNumberOrder -OrderType Release -OrderId 6aa4f786-8628-4923-9df1-896f3d84016c
129+
130+
Key Value
131+
--- -----
132+
OrderId 6aa4f786-8628-4923-9df1-896f3d84016c
133+
CreatedAt 2024-11-27T06:44:26.1975766+00:00
134+
Status Complete
135+
TotalCount 3
136+
SuccessCount 3
137+
FailureCount 0
138+
SuccessPhoneNumbers {+12063866355, +12063868075, +12063861642}
139+
FailedPhoneNumbers {}
140+
```
141+
142+
This example returns the status of a successful release order for Direct Routing telephone numbers.
143+
144+
### Example 5
145+
```powershell
146+
PS C:\> Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId faef09f7-5bd5-4740-9e76-9a5762380f34
147+
148+
Key Value
149+
--- -----
150+
OrderId faef09f7-5bd5-4740-9e76-9a5762380f34
151+
CreatedAt 2024-11-30T00:22:59.4989508+00:00
152+
Status Success
153+
TotalCount 1
154+
SuccessCount 1
155+
FailureCount 0
156+
WarningCount 0
157+
FailedPhoneNumbers {}
158+
WarningPhoneNumbers {}
159+
SuccessPhoneNumbers {+99999980}
160+
```
161+
162+
This example returns the status of a successful upload order for a Direct Routing phone number.
163+
88164
## PARAMETERS
89165

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

93169
```yaml
94170
Type: String
@@ -102,21 +178,40 @@ Accept pipeline input: False
102178
Accept wildcard characters: False
103179
```
104180
181+
### -OrderType
182+
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.
183+
184+
```yaml
185+
Type: String
186+
Parameter Sets: (All)
187+
Aliases:
188+
189+
Required: False
190+
Position: Named
191+
Default value: None
192+
Accept pipeline input: False
193+
Accept wildcard characters: False
194+
```
195+
105196
### CommonParameters
106-
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).
197+
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).
107198
108199
## INPUTS
109200
110201
## OUTPUTS
111202
112203
## NOTES
204+
Updates in Teams PowerShell Module version 6.7.1 and later:
205+
- A new optional parameter `OrderType` is introduced. If no OrderType is provided, it will default to a Search order.
206+
- [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.
207+
- Impact: Scripts and processes that reference the `TelephoneNumber` property will need to be updated to use `TelephoneNumbers`.
113208

114209
## RELATED LINKS
115-
116210
[Get-CsOnlineTelephoneNumberCountry](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumbercountry)
117211
[Get-CsOnlineTelephoneNumberType](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumbercountry)
118-
119212
[New-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/new-csonlinetelephonenumberorder)
120213
[Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/new-csonlinetelephonenumberorder)
121214
[Complete-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/new-csonlinetelephonenumberorder)
122215
[Clear-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/new-csonlinetelephonenumberorder)
216+
[New-CsOnlineDirectRoutingTelephoneNumberUploadOrder](https://learn.microsoft.com/powershell/module/teams/New-CsOnlineDirectRoutingTelephoneNumberUploadOrder)
217+
[New-CsOnlineTelephoneNumberReleaseOrder](https://learn.microsoft.com/powershell/module/teams/New-CsOnlineTelephoneNumberReleaseOrder)
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
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/New-CsOnlineDirectRoutingTelephoneNumberUploadOrder
5+
applicable: Microsoft Teams
6+
title: New-CsOnlineDirectRoutingTelephoneNumberUploadOrder
7+
author: pavellatif
8+
ms.author: pavellatif
9+
ms.reviewer: pavellatif
10+
manager: roykuntz
11+
schema: 2.0.0
12+
---
13+
14+
# New-CsOnlineDirectRoutingTelephoneNumberUploadOrder
15+
16+
## SYNOPSIS
17+
This cmdlet creates a request to upload Direct Routing telephone numbers to Microsoft Teams telephone number management inventory.
18+
19+
## SYNTAX
20+
21+
```
22+
New-CsOnlineDirectRoutingTelephoneNumberUploadOrder [-TelephoneNumber <String>] [-StartingNumber <String>] [-EndingNumber <String>]
23+
[-Description <String>] [<CommonParameters>]
24+
```
25+
26+
## DESCRIPTION
27+
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. [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.
28+
29+
## EXAMPLES
30+
31+
### Example 1
32+
```powershell
33+
PS C:\> New-CsOnlineDirectRoutingTelephoneNumberUploadOrder -TelephoneNumber "+123456789"
34+
cdf3073a-6fbb-4ade-a8af-e8fa1f3b9c13
35+
```
36+
37+
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 [Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder) cmdlet to retrieve the status of the order.
38+
39+
### Example 2
40+
```powershell
41+
PS C:\> New-CsOnlineDirectRoutingTelephoneNumberUploadOrder -StartingNumber "+12000000" -EndingNumber "+12000009"
42+
cdf3073a-6fbb-4ade-a8af-e8fa1f3b9c13
43+
```
44+
45+
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.
46+
47+
## PARAMETERS
48+
49+
### -TelephoneNumber
50+
This is the Direct Routing telephone number you wish to upload to Microsoft Teams telephone number management inventory.
51+
52+
```yaml
53+
Type: String
54+
Parameter Sets: (All)
55+
Aliases:
56+
57+
Required: False
58+
Position: Named
59+
Default value: None
60+
Accept pipeline input: False
61+
Accept wildcard characters: False
62+
```
63+
64+
### -StartingNumber
65+
This is the starting number of a range of Direct Routing telephone number you wish to upload to Microsoft Teams telephone number management inventory.
66+
67+
```yaml
68+
Type: String
69+
Parameter Sets: (All)
70+
Aliases:
71+
72+
Required: False
73+
Position: Named
74+
Default value: None
75+
Accept pipeline input: False
76+
Accept wildcard characters: False
77+
```
78+
79+
### -EndingNumber
80+
This is the ending number of a range of Direct Routing telephone number you wish to upload to Microsoft Teams telephone number management inventory.
81+
82+
```yaml
83+
Type: String
84+
Parameter Sets: (All)
85+
Aliases:
86+
87+
Required: False
88+
Position: Named
89+
Default value: None
90+
Accept pipeline input: False
91+
Accept wildcard characters: False
92+
```
93+
94+
### -Description
95+
Add a meaningful description that will help you identify the reason for this upload order.
96+
97+
```yaml
98+
Type: String
99+
Parameter Sets: (All)
100+
Aliases:
101+
102+
Required: False
103+
Position: Named
104+
Default value: None
105+
Accept pipeline input: False
106+
Accept wildcard characters: False
107+
```
108+
109+
### CommonParameters
110+
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).
111+
112+
## INPUTS
113+
114+
### None
115+
116+
## OUTPUTS
117+
118+
### System.String
119+
120+
## NOTES
121+
The cmdlet is available in Teams PowerShell module 6.7.1 or later.
122+
123+
The cmdlet is only available in commercial and GCC cloud instances.
124+
125+
## RELATED LINKS
126+
[Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder)
127+
[New-CsOnlineTelephoneNumberReleaseOrder](https://learn.microsoft.com/powershell/module/teams/New-CsOnlineTelephoneNumberReleaseOrder)

0 commit comments

Comments
 (0)