Get-CsOnlineTelephoneNumber
Use the Get-CsOnlineTelephoneNumber
to retrieve telephone numbers from the Business Voice Directory.
Syntax
Default (Default)
Get-CsOnlineTelephoneNumber
[-ActivationState <String>]
[-Assigned <MultiValuedProperty>]
[-CapitalOrMajorCity <String>]
[-DomainController <Fqdn>]
[-ExpandLocation]
[-Force]
[-InventoryType <MultiValuedProperty>]
[-IsNotAssigned]
[-ResultSize <UInt32>]
[-TelephoneNumber <String>]
[-TelephoneNumberGreaterThan <String>]
[-TelephoneNumberLessThan <String>]
[-TelephoneNumberStartsWith <String>]
[-Tenant <Guid>]
[<CommonParameters>]
Description
Note: This cmdlet has been deprecated. Use the new Get-CsPhoneNumberAssignment cmdlet instead. For Microsoft 365 GCC High and DoD cloud instances use the new Get-CshybridTelephoneNumber cmdlet instead.
Use the Get-CsOnlineTelephoneNumber
to retrieve telephone numbers from the Business Voice Directory.
Note: By default the result size is limited to 500 items, specify a higher result size using ResultSize parameter.
Examples
Example 1
PS C:\> Get-CsOnlineTelephoneNumber -TelephoneNumber 19294450177
This example gets the attributes of a specific phone number.
Example 2
PS C:\> Get-CsOnlineTelephoneNumber -CapitalOrMajorCity NOAM-US-NY-NY
RunspaceId : f90303a9-c6a8-483c-b3b3-a5b8cdbab19c
ActivationState : Activated
BridgeNumber :
CallingProfile : BandwidthUS
InventoryType : Service
CityCode : NOAM-US-NY-NY
Id : 19294450177
InventoryType : Service
Location :
O365Region : NOAM
SourceType : Tnm
TargetType : caa
Tenant :
TenantId :
UserId :
IsManagedByServiceDesk : True
PortInOrderStatus :
This example gets the phone numbers with the city code designating New York, New York.
Parameters
-ActivationState
Applicable: Microsoft Teams
This parameter is reserved for internal Microsoft use.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Assigned
Applicable: Microsoft Teams
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.
Parameter properties
Type: | MultiValuedProperty |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-CapitalOrMajorCity
Applicable: Microsoft Teams
Specifies the city by a concatenated string in the form: region-country-area-city. For example, "NOAM-US-OR-PO" would specify Portland, Oregon.
The values for the CapitalOrMajorCity parameter are case-sensitive.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | CityCode |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-DomainController
Applicable: Microsoft Teams
This parameter is reserved for internal Microsoft use.
Parameter properties
Type: | Fqdn |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | DC |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ExpandLocation
Applicable: Microsoft Teams
Displays the location parameter with its value.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Force
Applicable: Microsoft Teams
The Force switch specifies whether to suppress warning and confirmation messages. It can be useful in scripting to suppress interactive prompts. If the Force switch isn't provided in the command, you're prompted for administrative input if required.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-InventoryType
Applicable: Microsoft Teams
Specifies the target telephone number type for the cmdlet. Acceptable values are:
"Service" for numbers assigned to conferencing support, call queue or auto attendant.
"Subscriber" for numbers supporting public switched telephone network (PSTN) functions.
The values for the InventoryType parameter are case-sensitive.
Parameter properties
Type: | MultiValuedProperty |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-IsNotAssigned
Applicable: Microsoft Teams
Specifying this switch parameter will return only telephone numbers which are not assigned.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ResultSize
Applicable: Microsoft Teams
Specifies the number of records returned by the cmdlet. The result size can be set to any whole number between 0 and 2147483647, inclusive. If set to 0, the command will run, but no data will be returned.
Parameter properties
Type: | UInt32 |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-TelephoneNumber
Applicable: Microsoft Teams
Specifies the target telephone number. For example:
-TelephoneNumber tel:+18005551234, or -TelephoneNumber +14251234567
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-TelephoneNumberGreaterThan
Applicable: Microsoft Teams
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.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-TelephoneNumberLessThan
Applicable: Microsoft Teams
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.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-TelephoneNumberStartsWith
Applicable: Microsoft Teams
Specifies the digits that the returned telephone numbers must begin with. To return numbers in the North American Numbering Plan 425 area code, use this syntax: -TelephoneNumberStartsWith 1425. To return numbers that are in the 206 area code and that begin with 88, use this syntax: -TelephoneNumberStartsWith 120688. You can use up to nine digits.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Tenant
Applicable: Microsoft Teams
This parameter is reserved for internal Microsoft use.
Parameter properties
Type: | Guid |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
None
Outputs
Deserialized.Microsoft.Skype.EnterpriseVoice.BVDClient.Number
An instance or array of the objects.