Skip to content

Commit 20f97e1

Browse files
Merge pull request #12478 from pavellatif/main
Updating DR inventory examples
2 parents ca4b3d0 + bb1f1b0 commit 20f97e1

File tree

3 files changed

+102
-22
lines changed

3 files changed

+102
-22
lines changed

teams/teams-ps/teams/Get-CsPhoneNumberAssignment.md

Lines changed: 78 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This cmdlet displays information about one or more phone numbers.
2121
### Assignment (Default)
2222
```powershell
2323
Get-CsPhoneNumberAssignment [-ActivationState <string>] [-AssignedPstnTargetId <string>] [-AssignmentCategory <string>]
24-
[-CapabilitiesContain <string>] [-CivicAddressId <string>] [-IsoCountryCode <string>]
24+
[-CapabilitiesContain <string>] [-CivicAddressId <string>] [-Filter <String>] [-IsoCountryCode <string>]
2525
[-LocationId <string>] [-NetworkSiteId <string>] [-NumberType <string>] [-PstnAssignmentStatus <string>] [-Skip <int>] [-TelephoneNumber <string>]
2626
[-TelephoneNumberContain <string>] [-TelephoneNumberGreaterThan <string>] [-TelephoneNumberLessThan <string>]
2727
[-TelephoneNumberStartsWith <string>] [-Top <int>] [<CommonParameters>]
@@ -34,7 +34,7 @@ Returned results are sorted by TelephoneNumber in ascending order.
3434

3535
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.
3636

37-
By default, this cmdlet returns a maximum of 500 results.
37+
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.
3838

3939
## EXAMPLES
4040

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

133133
### Example 9
134134
```powershell
135-
(Get-CsPhoneNumberAssignment | Where-Object {!$_.NumberType.Contains('DirectRouting') -and $_.Capability.Contains('VoiceApplicationAssignment') -and $_.Capability.Contains('ConferenceAssignment')}).Count
135+
Get-CsPhoneNumberAssignment -Top (50::500)
136136
```
137-
This example returns the number of Calling Plan or Operator Connect service phone numbers that can be assigned to voice applications and conference bridges.
137+
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.
138138

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

145145
### Example 11
146146
```powershell
@@ -176,6 +176,63 @@ ReverseNumberLookup : {SkipInternalVoip}
176176
```
177177
This example displays when SkipInternalVoip option is turned on for a number.
178178

179+
### Example 13
180+
```powershell
181+
Get-CsPhoneNumberAssignment -Filter "TelephoneNumber -eq '+12065551000'"
182+
```
183+
```output
184+
TelephoneNumber : +12065551000
185+
OperatorId : 83d289bc-a4d3-41e6-8a3f-cff260a3f091
186+
NumberType : DirectRouting
187+
ActivationState : Activated
188+
AssignedPstnTargetId : 2713551e-ed63-415d-9175-fc4ff825a0be
189+
AssignmentCategory : Primary
190+
Capability : {ConferenceAssignment, VoiceApplicationAssignment, UserAssignment}
191+
City :
192+
CivicAddressId : 00000000-0000-0000-0000-000000000000
193+
IsoCountryCode :
194+
IsoSubdivision :
195+
LocationId : 00000000-0000-0000-0000-000000000000
196+
LocationUpdateSupported : True
197+
NetworkSiteId :
198+
PortInOrderStatus :
199+
PstnAssignmentStatus : UserAssigned
200+
PstnPartnerId :
201+
PstnPartnerName :
202+
NumberSource : OnPremises
203+
ReverseNumberLookup : {}
204+
```
205+
This example shows a way to use -Filter parameter to display information of a specific number.
206+
207+
### Example 14
208+
```powershell
209+
Get-CsPhoneNumberAssignment -Filter "TelephoneNumber -like '+12065551000' -and NumberType -eq 'DirectRouting'"
210+
```
211+
```output
212+
TelephoneNumber : +12065551000
213+
OperatorId : 83d289bc-a4d3-41e6-8a3f-cff260a3f091
214+
NumberType : DirectRouting
215+
ActivationState : Activated
216+
AssignedPstnTargetId : 2713551e-ed63-415d-9175-fc4ff825a0be
217+
AssignmentCategory : Primary
218+
Capability : {ConferenceAssignment, VoiceApplicationAssignment, UserAssignment}
219+
City :
220+
CivicAddressId : 00000000-0000-0000-0000-000000000000
221+
IsoCountryCode :
222+
IsoSubdivision :
223+
LocationId : 00000000-0000-0000-0000-000000000000
224+
LocationUpdateSupported : True
225+
NetworkSiteId :
226+
PortInOrderStatus :
227+
PstnAssignmentStatus : UserAssigned
228+
PstnPartnerId :
229+
PstnPartnerName :
230+
NumberSource : OnPremises
231+
ReverseNumberLookup : {}
232+
```
233+
This example shows a way to get filtered results using multiple Filter parameters.
234+
235+
179236
## PARAMETERS
180237

181238
### -ActivationState
@@ -257,6 +314,21 @@ Accept pipeline input: False
257314
Accept wildcard characters: False
258315
```
259316
317+
### -Filter
318+
This can be used to filter on one or more parameters within the search results.
319+
320+
```yaml
321+
Type: String
322+
Parameter Sets: (All)
323+
Aliases:
324+
325+
Required: False
326+
Position: Named
327+
Default value: None
328+
Accept pipeline input: False
329+
Accept wildcard characters: False
330+
```
331+
260332
### -IsoCountryCode
261333
Filters the returned results based on the ISO 3166-1 Alpha-2 country code assigned to the phone number.
262334

teams/teams-ps/teams/New-CsOnlineDirectRoutingTelephoneNumberUploadOrder.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,18 @@ schema: 2.0.0
1414
# New-CsOnlineDirectRoutingTelephoneNumberUploadOrder
1515

1616
## SYNOPSIS
17-
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.
17+
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.
1818

1919
## SYNTAX
2020

2121
```
22-
New-CsOnlineDirectRoutingTelephoneNumberUploadOrder [-TelephoneNumber <String>] [-StartingNumber <String>] [-EndingNumber <String>]
23-
[-Description <String>] [<CommonParameters>]
22+
New-CsOnlineDirectRoutingTelephoneNumberUploadOrder [-TelephoneNumber <String>] [-StartingNumber <String>] [-EndingNumber <String>] [-FileContent <Byte[]>] [<CommonParameters>]
2423
```
2524

2625
## DESCRIPTION
2726
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.
2827

29-
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"`.
28+
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"`.
3029

3130
## EXAMPLES
3231

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

39-
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"`.
38+
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"`.
4039

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

47-
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"`.
46+
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"`.
4847

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

55-
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"`.
54+
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"`.
55+
56+
### Example 4
57+
```powershell
58+
PS C:\> $drlist = [System.IO.File]::ReadAllBytes("C:\Users\testuser\DrNumber.csv")
59+
PS C:\> New-CsOnlineDirectRoutingTelephoneNumberUploadOrder -FileContent $drlist
60+
cdf3073a-6fbb-4ade-a8af-e8fa1f3b9c19
61+
```
62+
63+
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"`.
5664

5765
## PARAMETERS
5866

@@ -101,11 +109,11 @@ Accept pipeline input: False
101109
Accept wildcard characters: False
102110
```
103111
104-
### -Description
105-
Add a meaningful description that will help you identify the reason for this upload order.
112+
### -FileContent
113+
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.
106114
107115
```yaml
108-
Type: String
116+
Type: Byte[]
109117
Parameter Sets: (All)
110118
Aliases:
111119

@@ -133,5 +141,5 @@ The cmdlet is available in Teams PowerShell module 6.7.1 or later.
133141
The cmdlet is only available in commercial and GCC cloud instances.
134142
135143
## RELATED LINKS
136-
[Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumberorder)
137-
[New-CsOnlineTelephoneNumberReleaseOrder](https://learn.microsoft.com/powershell/module/teams/New-csonlinetelephonenumberreleaseorder)
144+
[Get-CsOnlineTelephoneNumberOrder](./get-csonlinetelephonenumberorder.md)
145+
[New-CsOnlineTelephoneNumberReleaseOrder](./new-csonlinetelephonenumberreleaseorder.md)

teams/teams-ps/teams/New-CsOnlineTelephoneNumberReleaseOrder.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ New-CsOnlineTelephoneNumberReleaseOrder [-TelephoneNumber <String>] [-StartingNu
2525
## DESCRIPTION
2626
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.
2727

28-
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"`.
28+
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"`.
2929

3030
## EXAMPLES
3131

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

38-
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"`.
38+
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"`.
3939

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

46-
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"`.
46+
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"`.
4747

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

54-
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"`.
54+
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"`.
5555

5656
## PARAMETERS
5757

0 commit comments

Comments
 (0)