external help file | Module Name | online version | schema |
---|---|---|---|
Microsoft.Azure.PowerShell.Cmdlets.Resources.dll-Help.xml |
Az.Resources |
2.0.0 |
Gets the details of Subscription(s) under a Management Group.
Get-AzManagementGroupSubscription [-GroupName] <String> [[-SubscriptionId] <String>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
The Get-AzManagementGroupSubscription cmdlet gets the subscription info under a Management Group. Providing the SubscriptionId and GroupName will give only the Subscription details for that subscription. Providing only the GroupName will list the details for all Subscriptions under the Management Group.
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
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
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Management Group Id
Type: System.String
Parameter Sets: (All)
Aliases: GroupId
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Return true
on successful execution
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Subscription Id of the subscription associated with the management
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.