Example 1: Get the list of reservation orders in the current tenant
Get-AzReservation
Location ReservationOrderId/ReservationId Sku State BenefitStartTime ExpiryDate LastUpdatedDateTime SkuDescription
-------- -------------------------------- --- ----- ---------------- ---------- ------------------- --------------
centralus a87c1742-0080-5b4d-b953-8531ad46fdc8/cad6fef7-ae86-4d47-91d0-67c897934bfe Standard_B1s Succeeded 6/1/2024 12:00:00 AM
westeurope c5cf5c26-1920-4895-bf34-098ed1c69b92/6540137e-5a4f-4a14-bd17-3f2ea72b1ff4 premium_ssd_managed_disks_p30 Succeeded 6/1/2022 12:00:00 AM
centralus bd82bff8-4d29-9375-8194-ce0709fc1691/f2c3a058-b469-4529-88fa-1bae251c4a47 Standard_B1s Cancelled 6/1/2024 12:00:00 AM
Get the list of reservation orders in the current tenant.
By design, some properties do not have data due to the api response(e.g.
LastUpdatedDateTime and SkuDescription).
In this case please get the single reservation with command in example 2 to get the missing data.
Some data might be truncated due to the width of powershell view, appending this to the end of the command to show the truncated data: | ft -Wrap
Example 2: Get the reservation details given ReservationOrderId and ReservationId
Location ReservationOrderId/ReservationId Sku State BenefitStartTime ExpiryDate LastUpdatedDateTime SkuDescription
-------- -------------------------------- --- ----- ---------------- ---------- ------------------- --------------
centralus a87c1742-0080-5b4d-b953-8531ad46fdc8/cad6fef7-ae86-4d47-91d0-67c897934bfe Standard_B1s Succeeded 6/1/2021 5:01:58 PM 6/1/2024 12:00:00 AM 6/1/2021 5:02:09 PM Reserved VM Instance, Standard_B1s, US Central, 3 Years
Get the details of a single reservation.
Some data might be truncated due to the width of powershell view, appending this to the end of the command to show the truncated data: | ft -Wrap
Parameters
-DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
May be used to filter by reservation properties.
The filter supports 'eq', 'or', and 'and'.
It does not currently support 'ne', 'gt', 'le', 'ge', or 'not'.
Reservation properties include sku/name, properties/{appliedScopeType, archived, displayName, displayProvisioningState, effectiveDateTime, expiryDate, expiryDateTime, provisioningState, quantity, renew, reservedResourceType, term, userFriendlyAppliedScopeType, userFriendlyRenewState}
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.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.