Edit

Share via


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

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

-InstanceView

Get the Instance View of the Capacity Reservation.

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:True
Value from remaining arguments:False

-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

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

-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

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

-ResourceGroupName

Specifies the name of a resource group.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
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

String

SwitchParameter

Outputs

PSCapacityReservation