편집

다음을 통해 공유


Get-AzCapacityReservation

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

Syntax

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.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InstanceView

Get the Instance View of the Capacity Reservation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specifies the name of the capacity reservation resource.

Type:String
Aliases:CapacityReservationName
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:True

-ReservationGroupName

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

Type:String
Aliases:CapacityReservationGroupName
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:True

-ResourceGroupName

Specifies the name of a resource group.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:True

Inputs

String

SwitchParameter

Outputs

PSCapacityReservation