diff --git a/teams/teams-ps/teams/Get-CsOnlineTelephoneNumberOrder.md b/teams/teams-ps/teams/Get-CsOnlineTelephoneNumberOrder.md index d5b8a5dbef..b1587b04f5 100644 --- a/teams/teams-ps/teams/Get-CsOnlineTelephoneNumberOrder.md +++ b/teams/teams-ps/teams/Get-CsOnlineTelephoneNumberOrder.md @@ -5,90 +5,127 @@ Module Name: MicrosoftTeams title: Get-CsOnlineTelephoneNumberOrder schema: 2.0.0 manager: mreddy -author: TristanChen-msft -ms.author: jiaych -ms.reviewer: julienp +author: gracenlin +ms.author: gracenlin +ms.reviewer: --- # Get-CsOnlineTelephoneNumberOrder ## SYNOPSIS -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. +Use the `Get-CsOnlineTelephoneNumberOrder` cmdlet to get the order report of a specific telephone number order. ## SYNTAX ``` -Get-CsOnlineTelephoneNumberOrder [-OrderId] [] +Get-CsOnlineTelephoneNumberOrder [-OrderType] [-OrderId] [] ``` ## DESCRIPTION -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. +Use the `Get-CsOnlineTelephoneNumberOrder` cmdlet to get the order report of a specific telephone number order. ## EXAMPLES -### -------------------------- Example 1 -------------------------- +### ---- Example 1: Getting a Search Order ---- ``` -PS C:\> $order = Get-CsOnlineTelephoneNumberOrder -OrderId 1efd85ca-dd46-41b3-80a0-2e4c5f87c912 - -AreaCode : -CivicAddressId : -CountryCode : US -CreatedAt : 8/23/2021 5:43:44 PM -Description : test -ErrorCode : NoError -Id : 1efd85ca-dd46-41b3-80a0-2e4c5f87c912 -InventoryType : Subscriber -IsManual : False -Name : test -NumberPrefix : 1718 -NumberType : UserSubscriber -Quantity : 1 -ReservationExpiryDate : 8/23/2021 5:59:45 PM -SearchType : Prefix -SendToServiceDesk : False -Status : Reserved -TelephoneNumber : {Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.TelephoneNumberSearchResult} - -PS C:\> $order.TelephoneNumber - -Location TelephoneNumber --------- --------------- -New York City +17182000004 +PS C:\> $order = Get-CsOnlineTelephoneNumberOrder -OrderType Search -OrderId 1fd52b3b-b804-4ac4-a84d-4d70b51dd4be + +Key Value +--- ----- +Id 1fd52b3b-b804-4ac4-a84d-4d70b51dd4be +Name Postal Code Search Test +CreatedAt 2024-11-30T00:34:00.0825627+00:00 +CreatedBy TNM +Description Postal Code Search Test from Postman +NumberType UserSubscriber +SearchType PostalCode +AreaCode 778 +PostalOrZipCode V7Y 1G5 +Quantity 2 +Status Reserved +IsManual False +TelephoneNumbers {System.Collections.Generic.Dictionary`2[System.String,System.Object], System.Collections.Generic.Dictionary`2[System.String,System.Object]} +ReservationExpiryDate 2024-11-30T00:50:01.1794152+00:00 +ErrorCode NoError +InventoryType Subscriber +SendToServiceDesk False +CountryCode CA + +PS C:\> $order.TelephoneNumbers + +Key Value +--- ----- +Location Vancouver +TelephoneNumber +16046606034 +Location Vancouver +TelephoneNumber +16046606030 ``` -This example returns a successful telephone number search and the telephone number +17182000004 is reserved for purchase. +If the OrderType is not provided, it will default to a Search order: +``` +PS C:\> Get-CsOnlineTelephoneNumberOrder -OrderId 1fd52b3b-b804-4ac4-a84d-4d70b51dd4be + +Key Value +--- ----- +Id 1fd52b3b-b804-4ac4-a84d-4d70b51dd4be +Name Postal Code Search Test +CreatedAt 2024-11-30T00:34:00.0825627+00:00 +CreatedBy TNM +Description Postal Code Search Test from Postman +NumberType UserSubscriber +SearchType PostalCode +AreaCode 778 +PostalOrZipCode V7Y 1G5 +Quantity 2 +Status Expired +IsManual False +TelephoneNumbers {System.Collections.Generic.Dictionary`2[System.String,System.Object], System.Collections.Generic.Dictionary`2[System.String,System.Object]} +ReservationExpiryDate 2024-11-30T00:50:01.1794152+00:00 +ErrorCode NoError +InventoryType Subscriber +SendToServiceDesk False +CountryCode CA +``` -### -------------------------- Example 2 -------------------------- +### ---- Example 2: Getting a Release Order ---- ``` -PS C:\> $order = Get-CsOnlineTelephoneNumberOrder -OrderId 8d23e073-bc98-4f73-8e05-7517655d7042 - -AreaCode : -CivicAddressId : -CountryCode : US -CreatedAt : 8/23/2021 6:53:12 PM -Description : test -ErrorCode : OutOfStock -Id : 8d23e073-bc98-4f73-8e05-7517655d7042 -InventoryType : Subscriber -IsManual : False -Name : test -NumberPrefix : 1425 -NumberType : UserSubscriber -Quantity : 1 -ReservationExpiryDate : -SearchType : Prefix -SendToServiceDesk : False -Status : Error -TelephoneNumber : {} +PS C:\> Get-CsOnlineTelephoneNumberOrder -OrderType Release -OrderId 6aa4f786-8628-4923-9df1-896f3d84016c + +Key Value +--- ----- +OrderId 6aa4f786-8628-4923-9df1-896f3d84016c +CreatedAt 2024-11-27T06:44:26.1975766+00:00 +Status Complete +TotalCount 3 +SuccessCount 3 +FailureCount 0 +SuccessPhoneNumbers {+12063866355, +12063868075, +12063861642} +FailedPhoneNumbers {} ``` -This example returns a failed telephone number search and the `ErrorCode` is showing that telephone numbers with `NumberPrefix: 1425` is `OutOfStock`. +### ---- Example 3: Getting a DirectRoutingNumberCreation Order ---- +``` +PS C:\> Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId faef09f7-5bd5-4740-9e76-9a5762380f34 + +Key Value +--- ----- +OrderId faef09f7-5bd5-4740-9e76-9a5762380f34 +CreatedAt 2024-11-30T00:22:59.4989508+00:00 +Status Success +TotalCount 1 +SuccessCount 1 +FailureCount 0 +WarningCount 0 +FailedPhoneNumbers {} +WarningPhoneNumbers {} +SuccessPhoneNumbers {+99999980} +``` ## PARAMETERS -### OrderId -Specifies the telephone number search order to look up. Use `New-CsOnlineTelephoneNumberOrder` to create a search order to obtain a search order Id. +### `-OrderId` +Specifies the identifier of the telephone number order to look up. ```yaml Type: String @@ -102,21 +139,34 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### `-OrderType` +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. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: Search +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters 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). -## INPUTS - -## OUTPUTS ## NOTES +Updates in Teams PowerShell Module version 6.8.0 and later: +- A new optional parameter `OrderType` is introduced. If no OrderType is provided, it will default to a Search order. +- [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. + - Impact: Scripts and processes that reference the `TelephoneNumber` property will need to be updated to use `TelephoneNumbers`. + ## RELATED LINKS - -[Get-CsOnlineTelephoneNumberCountry](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumbercountry) -[Get-CsOnlineTelephoneNumberType](https://learn.microsoft.com/powershell/module/teams/get-csonlinetelephonenumbercountry) - -[New-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/new-csonlinetelephonenumberorder) -[Get-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/new-csonlinetelephonenumberorder) -[Complete-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/new-csonlinetelephonenumberorder) -[Clear-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/new-csonlinetelephonenumberorder) +- Create a Search order: [New-CsOnlineTelephoneNumberOrder](https://learn.microsoft.com/powershell/module/teams/new-csonlinetelephonenumberorder) +- Create a Release order: [New-CsOnlineTelephoneNumberReleaseOrder.md](https://learn.microsoft.com/powershell/module/teams/new-csonlinetelephonenumberreleaseorder.md) +- Create a DirectRoutingNumberCreation order: [New-CsOnlineDirectRoutingTelephoneNumberUploadOrder.md](https://learn.microsoft.com/powershell/module/teams/new-csonlinedirectroutingtelephonenumberuploadorder.md) diff --git a/teams/teams-ps/teams/New-CsOnlineDirectRoutingTelephoneNumberUploadOrder.md b/teams/teams-ps/teams/New-CsOnlineDirectRoutingTelephoneNumberUploadOrder.md new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/teams/teams-ps/teams/New-CsOnlineDirectRoutingTelephoneNumberUploadOrder.md @@ -0,0 +1 @@ + diff --git a/teams/teams-ps/teams/New-CsOnlineTelephoneNumberReleaseOrder.md b/teams/teams-ps/teams/New-CsOnlineTelephoneNumberReleaseOrder.md new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/teams/teams-ps/teams/New-CsOnlineTelephoneNumberReleaseOrder.md @@ -0,0 +1 @@ +