Dela via


Get-AzManagementGroupSubscription

Hämtar information om prenumerationer under en hanteringsgrupp.

Syntax

Get-AzManagementGroupSubscription
   [-GroupName] <String>
   [[-SubscriptionId] <String>]
   [-PassThru]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Cmdleten Get-AzManagementGroupSubscription hämtar prenumerationsinformationen under en hanteringsgrupp. Om du anger SubscriptionId och GroupName får du bara prenumerationsinformationen för den prenumerationen. Om du endast anger GroupName visas information om alla prenumerationer under hanteringsgruppen.

Exempel

Exempel 1: Hämta prenumerationsinformation under en hanteringsgrupp

Get-AzManagementGroupSubscription -GroupName "TestGroup" -SubscriptionId 5602fbd9-fb0d-4fbb-98b3-10c8ea20b6de

Name              : 5602fbd9-fb0d-4fbb-98b3-10c8ea20b6de
Type              : Microsoft.Management/managementGroups/subscriptions
Id                : /providers/Microsoft.Management/managementGroups/TestGroup/subscriptions/5602fbd9-fb0d-4fbb-98b3-10c8ea20b6de
TenantId          : 14307de0-5e6f-46cf-b2ba-64a062964d30
DisplayName       : Visual Studio Enterprise Subscription
ParentId          : /providers/Microsoft.Management/managementGroups/TestGroup
State             : Active

Exempel 2: Hämta all prenumerationsinformation under en hanteringsgrupp

Get-AzManagementGroupSubscription -GroupName "TestGroup"

Name              : 5602fbd9-fb0d-4fbb-98b3-10c8ea20b6de
Type              : Microsoft.Management/managementGroups/subscriptions
Id                : /providers/Microsoft.Management/managementGroups/TestGroup/subscriptions/5602fbd9-fb0d-4fbb-98b3-10c8ea20b6de
TenantId          : 14307de0-5e6f-46cf-b2ba-64a062964d30
DisplayName       : Visual Studio Enterprise Subscription
ParentId          : /providers/Microsoft.Management/managementGroups/TestGroup
State             : Active

Name              : 2120692d-35c3-44c8-81f5-631fa7351726
Type              : Microsoft.Management/managementGroups/subscriptions
Id                : /providers/Microsoft.Management/managementGroups/TestGroup/subscriptions/2120692d-35c3-44c8-81f5-631fa7351726
TenantId          : 14307de0-5e6f-46cf-b2ba-64a062964d30
DisplayName       : Test Subscription
ParentId          : /providers/Microsoft.Management/managementGroups/TestGroup
State             : Active

Parametrar

-Confirm

Uppmanar dig att bekräfta innan du kör cmdleten.

Typ:SwitchParameter
Aliases:cf
Position:Named
standardvärde:None
Obligatorisk:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.

Typ:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
standardvärde:None
Obligatorisk:False
Accept pipeline input:False
Accept wildcard characters:False

-GroupName

Hanteringsgrupps-ID

Typ:String
Aliases:GroupId
Position:0
standardvärde:None
Obligatorisk:True
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Returnera vid true lyckad körning

Typ:SwitchParameter
Position:Named
standardvärde:None
Obligatorisk:False
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

Prenumerations-ID för den prenumeration som är associerad med hanteringen

Typ:String
Position:1
standardvärde:None
Obligatorisk:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Visar vad som skulle hända om cmdleten kördes. Cmdleten körs inte.

Typ:SwitchParameter
Aliases:wi
Position:Named
standardvärde:None
Obligatorisk:False
Accept pipeline input:False
Accept wildcard characters:False

Indata

None

Utdata

PSManagementGroupSubscription