Edit

Split-AzReservation

Split a Reservation order.

Syntax

Default (Default)

Split-AzReservation
    -OrderId <String>
    -ReservationId <String>
    -Quantity <Int32[]>
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Split a Reservation order.

Examples

Example 1: Split one reservation order into two reservations

Split-AzReservation -ReservationOrderId "c615c897-aaaa-4123-8527-c42cc0da41e0" -ReservationId "1bdfaf4a-159d-46ec-be3a-f4aa527d423c" -Quantity @(2,8)
Location   ReservationOrderId/ReservationId                                             Sku           State     BenefitStartTime     ExpiryDate           LastUpdatedDateTime  SkuDescription
--------   --------------------------------                                             ---           -----     ----------------     ----------           -------------------  --------------
westeurope c615c897-aaaa-4123-8527-c42cc0da41e0/f4f0f24c-30d4-4f5d-823c-4a9e1e18b381/2  Standard_B1ls Succeeded 7/7/2022 10:55:12 PM 7/7/2025 12:00:00 AM 7/7/2022 11:21:51 PM Reserved VM Ins…
westeurope c615c897-aaaa-4123-8527-c42cc0da41e0/85cd4ee6-654e-47df-b230-7fb2f1e86714/2  Standard_B1ls Succeeded 7/7/2022 10:55:12 PM 7/7/2025 12:00:00 AM 7/7/2022 11:21:51 PM Reserved VM Ins…
westeurope c615c897-aaaa-4123-8527-c42cc0da41e0/1bdfaf4a-159d-46ec-be3a-f4aa527d423c/12 Standard_B1ls Cancelled 7/7/2022 10:55:12 PM 7/7/2025 12:00:00 AM 7/7/2022 11:21:51 PM Reserved VM Ins…

Split one reservation order into two reservations, given the quantity of each reservation. The quantity sum up should be equal to the original reservation before splitting. ReservationId can be either GUID form or fully qualified reservation id form "providers/Microsoft.Capacity/reservationOrders/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/reservations/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzureRMContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OrderId

Reservation Order Id.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ReservationOrderId

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Quantity

Quantity.

Parameter properties

Type:

Int32[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ReservationId

Reservation Id.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

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.

Outputs

IReservationResponse