Get-CsOnlineTelephoneNumber

 

上次修改主題的時間:2017-06-20

Use the Get-CsOnlineTelephoneNumber to retrieve telephone numbers from the Business Voice Directory.

Get-CsOnlineTelephoneNumber [-ActivationState <String>] [-Assigned <String>] [-CapitalOrMajorCity <String>] [-DomainController <Fqdn>] [-ExpandLocation <SwitchParameter>] [-Force <SwitchParameter>] [-InventoryType <String>] [-IsNotAssigned <SwitchParameter>] [-ResultSize <Unlimited>] [-TelephoneNumber <String>] [-TelephoneNumberGreaterThan <String>] [-TelephoneNumberLessThan <String>] [-TelephoneNumberStartsWith <String>] [-Tenant <Guid>]

This example gets the attributes of a specific phone number.

Get-CsOnlineTelephoneNumber -TelephoneNumber 19294450177

This example gets the phone numbers with the city code designating New York, New York.

Get-CsOnlineTelephoneNumber -CapitalOrMajorCity NOAM-US-NY-NY

Here is an example of the output of the Get-CsOnlineTelephoneNumber cmdlet.

RunspaceId     : f90303a9-c6a8-483c-b3b3-a5b8cdbab19c
CallingProfile : BandwidthUS
InventoryType  : Service
CityCode       : NOAM-US-NY-NY
Id             : 19294450177
O365Region     : NOAM
SourceType     : Tnm
TargetType     : caa
TargetMeta     : ;BridgeId=5bc815ae-d9e9-4fb6-af74-cf4fa73ceaa6
User           :
BridgeNumber   :

 

Parameter Required Type Description

ActivationState

Optional

System.String

PARAMVALUE: String

Assigned

Optional

System.String

Specifies the function of the telephone number. The acceptable values are:

  • "caa" for numbers assigned to conferencing functions.

  • "user" for numbers assigned to public switched telephone network (PSTN) functions.

註記注意事項:
The values for the Assigned parameter are case-sensitive.

CapitalOrMajorCity

Optional

System.String

指定 Cmdlet 的目標地理城市。若要取得城市的地理代碼的清單,請使用 Get-CsOnlineTelephoneNumberInventoryCities Cmdlet。

註記注意事項:
The values for the CapitalOrMajorCity parameter are case-sensitive.

DomainController

Optional

Microsoft.Rtc.Management.Deploy.Fqdn

將保留此參數供 Microsoft 內部使用。

ExpandLocation

Optional

System.Management.Automation.SwitchParameter

PARAMVALUE: SwitchParameter

Force

Optional

System.Management.Automation.SwitchParameter

Force 參數會指定是否抑制警告和確認訊息。這在撰寫指令碼以抑制互動式提示時可能很有用。如果命令中不提供 Force 參數,您會在必要時看到提示管理員輸入。

InventoryType

Optional

System.String

指定 Cmdlet 的目標電話號碼類型。可接受的值為:

  • 「服務」適用於指派給會議支援的數字。

  • 「訂閱者」適用於支援公用交換電話網路 (PSTN) 功能的號碼。

IsNotAssigned

Optional

System.Management.Automation.SwitchParameter

Specifying this switch parameter will return only telephone numbers which are not assigned.

ResultSize

Optional

Microsoft.Rtc.Management.ADConnect.Core.Unlimited

指定此 Cmdlet 所傳回的記錄筆數。結果大小可以設為 0 和 2147483647 (含) 之間的任何數字。如果設為 0,命令會執行,但不會傳回資料。

TelephoneNumber

Optional

System.String

指定目標電話號碼。例如:-TelephoneNumber tel:+18005551234-TelephoneNumber +14251234567

TelephoneNumberGreaterThan

Optional

System.String

Specifies a telephone number used by the cmdlet as the lower boundary of the telephone numbers returned. The telephone numbers returned will all be greater than the number provided. The telephone number should be in E.164 format.

TelephoneNumberLessThan

Optional

System.String

Specifies a telephone number used by the cmdlet as the upper boundary of the telephone numbers returned. The telephone numbers returned will all be less than the number provided. The telephone number should be in E.164 format.

TelephoneNumberStartsWith

Optional

System.String

Specifies the digits that the returned telephone numbers must begin with. To return numbers in the 425 area code, use this syntax: -TelephoneNumberStartsWith 425. To return numbers that are in the 206 area code and that begin with 88, use this syntax: -TelephoneNumberStartsWith 20688. You can use up to nine digits.

Tenant

Optional

System.Guid

將保留此參數供 Microsoft 內部使用。

BypassDualWrite

Optional

System.Boolean

PARAMVALUE: $true | $false

CityCode

Optional

System.String

PARAMVALUE: String

Confirm

Optional

System.Management.Automation.SwitchParameter

PARAMVALUE: SwitchParameter

WhatIf

Optional

System.Management.Automation.SwitchParameter

PARAMVALUE: SwitchParameter

Returns an instance, or an array of Deserialized.Microsoft.Skype.EnterpriseVoice.BVDClient.Number objects.

 
顯示: