@@ -20,7 +20,7 @@ This cmdlet displays information about one or more phone numbers.
20
20
### Assignment (Default)
21
21
``` powershell
22
22
Get-CsPhoneNumberAssignment [-ActivationState <string>] [-AssignedPstnTargetId <string>] [-AssignmentCategory <string>]
23
- [-CapabilitiesContain <string>] [-CivicAddressId <string>] [-IsoCountryCode <string>]
23
+ [-CapabilitiesContain <string>] [-CivicAddressId <string>] [-Filter <String>] [- IsoCountryCode <string>]
24
24
[-LocationId <string>] [-NetworkSiteId <string>] [-NumberType <string>] [-PstnAssignmentStatus <string>] [-Skip <int>] [-TelephoneNumber <string>]
25
25
[-TelephoneNumberContain <string>] [-TelephoneNumberGreaterThan <string>] [-TelephoneNumberLessThan <string>]
26
26
[-TelephoneNumberStartsWith <string>] [-Top <int>] [<CommonParameters>]
@@ -33,7 +33,7 @@ Returned results are sorted by TelephoneNumber in ascending order.
33
33
34
34
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.
35
35
36
- By default, this cmdlet returns a maximum of 500 results.
36
+ 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 list an incremental page of 1000 numbers. If a full list of telephone numbers acquired by the tenant is required, you can use [ Export-CsAcquiredPhoneNumber ] ( https://learn.microsoft.com/powershell/module/teams/export-csacquiredphonenumber ) cmdlet to download a list of all acquired telephone numbers.
37
37
38
38
## EXAMPLES
39
39
@@ -139,15 +139,21 @@ This example returns the number of Calling Plan or Operator Connect service phon
139
139
``` powershell
140
140
Get-CsPhoneNumberAssignment -Top ([int]::MaxValue)
141
141
```
142
- This example returns all phone numbers.
142
+ This example returns all phone numbers upto a maximum 1000 results .
143
143
144
144
### Example 11
145
145
``` powershell
146
+ Get-CsPhoneNumberAssignment -Skip 1000 -Top 1000
147
+ ```
148
+ This example returns all phone numbers between 1001 to 2000 sequence.
149
+
150
+ ### Example 12
151
+ ``` powershell
146
152
Get-CsPhoneNumberAssignment -AssignedPstnTargetId 'TeamsSharedCallingRoutingPolicy|Tag:SC1'
147
153
```
148
154
This example returns all phone numbers assigned as emergency numbers in the Teams shared calling routing policy instance SC1.
149
155
150
- ### Example 12
156
+ ### Example 13
151
157
``` powershell
152
158
Get-CsPhoneNumberAssignment -TelephoneNumber "+12065551000;ext=524"
153
159
```
@@ -175,6 +181,63 @@ ReverseNumberLookup : {SkipInternalVoip}
175
181
```
176
182
This example displays when SkipInternalVoip option is turned on for a number.
177
183
184
+ ### Example 14
185
+ ``` powershell
186
+ Get-CsPhoneNumberAssignment -Filter "TelephoneNumber -eq '+12065551000"
187
+ ```
188
+ ``` output
189
+ TelephoneNumber : +12065551000
190
+ OperatorId : 83d289bc-a4d3-41e6-8a3f-cff260a3f091
191
+ NumberType : DirectRouting
192
+ ActivationState : Activated
193
+ AssignedPstnTargetId : 2713551e-ed63-415d-9175-fc4ff825a0be
194
+ AssignmentCategory : Primary
195
+ Capability : {ConferenceAssignment, VoiceApplicationAssignment, UserAssignment}
196
+ City :
197
+ CivicAddressId : 00000000-0000-0000-0000-000000000000
198
+ IsoCountryCode :
199
+ IsoSubdivision :
200
+ LocationId : 00000000-0000-0000-0000-000000000000
201
+ LocationUpdateSupported : True
202
+ NetworkSiteId :
203
+ PortInOrderStatus :
204
+ PstnAssignmentStatus : UserAssigned
205
+ PstnPartnerId :
206
+ PstnPartnerName :
207
+ NumberSource : OnPremises
208
+ ReverseNumberLookup : {}
209
+ ```
210
+ This example shows a way to use -Filter parameter to display information of a specific number.
211
+
212
+ ### Example 15
213
+ ``` powershell
214
+ Get-CsPhoneNumberAssignment -Filter "TelephoneNumber -like '+12065551000' -and NumberType -eq 'DirectRouting'"
215
+ ```
216
+ ``` output
217
+ TelephoneNumber : +12065551000
218
+ OperatorId : 83d289bc-a4d3-41e6-8a3f-cff260a3f091
219
+ NumberType : DirectRouting
220
+ ActivationState : Activated
221
+ AssignedPstnTargetId : 2713551e-ed63-415d-9175-fc4ff825a0be
222
+ AssignmentCategory : Primary
223
+ Capability : {ConferenceAssignment, VoiceApplicationAssignment, UserAssignment}
224
+ City :
225
+ CivicAddressId : 00000000-0000-0000-0000-000000000000
226
+ IsoCountryCode :
227
+ IsoSubdivision :
228
+ LocationId : 00000000-0000-0000-0000-000000000000
229
+ LocationUpdateSupported : True
230
+ NetworkSiteId :
231
+ PortInOrderStatus :
232
+ PstnAssignmentStatus : UserAssigned
233
+ PstnPartnerId :
234
+ PstnPartnerName :
235
+ NumberSource : OnPremises
236
+ ReverseNumberLookup : {}
237
+ ```
238
+ This example shows a way to get filtered results using multiple Filter parameters.
239
+
240
+
178
241
## PARAMETERS
179
242
180
243
### -ActivationState
@@ -256,6 +319,21 @@ Accept pipeline input: False
256
319
Accept wildcard characters : False
257
320
` ` `
258
321
322
+ ### -Filter
323
+ {{ Fill Filter Description }}
324
+
325
+ ` ` ` yaml
326
+ Type : String
327
+ Parameter Sets : (All)
328
+ Aliases :
329
+
330
+ Required : False
331
+ Position : Named
332
+ Default value : None
333
+ Accept pipeline input : False
334
+ Accept wildcard characters : False
335
+ ` ` `
336
+
259
337
### -IsoCountryCode
260
338
Filters the returned results based on the ISO 3166-1 Alpha-2 country code assigned to the phone number.
261
339
0 commit comments