Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Get-AzCapacityReservation

Gets the properties of Capacity Reservation resources from a Capacity Reservation Group

Syntax

Default (Default)

Get-AzCapacityReservation
 -ResourceGroupName <String>
 -ReservationGroupName <String>
 [-Name <String>]
 [-InstanceView]
 [-DefaultProfile <IAzureContextContainer>]
 [<CommonParameters>]

Description

The Get-AzCapacityReservation cmdlet gets the properties of Capacity Reservation resources from a Capacity Reservation Group

Examples

Example 1

Get-AzCapacityReservation -ResourceGroupName $rgname -ReservationGroupName "CRGroup1"

This will retrieve all the Capacity Reservation resources from the Capacity Reservation Group named "CRGroup1".

Example 2

Get-AzCapacityReservation -ResourceGroupName $rgname -ReservationGroupName "CRGroup1" -Name "resource1" -InstanceView

This will retrieve the Capacity Reservation resource named "resource1" with its instance view information from the Capacity Reservation Group named "CRGroup1".

Parameters

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

-InstanceView

Get the Instance View of the Capacity Reservation.

Parameter properties

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

Parameter sets

-Name

Specifies the name of the capacity reservation resource.

Parameter properties

Type:String
Default value:None
Supports wildcards:True
DontShow:False
Aliases:CapacityReservationName

Parameter sets

-ReservationGroupName

Name of the Capacity Reservation Group that the capacity reservation resource is in.

Parameter properties

Type:String
Default value:None
Supports wildcards:True
DontShow:False
Aliases:CapacityReservationGroupName

Parameter sets

-ResourceGroupName

Specifies the name of a resource group.

Parameter properties

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

Parameter sets

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

String

SwitchParameter

Outputs

PSCapacityReservation


Feedback

Was this page helpful?