Get-AzResourceGroup
Show details of a specific resource group.
Syntax
List (Default)
Get-AzResourceGroup
[-SubscriptionId <string>]
[-Profile <string>]
[<CommonParameters>]
Get
Get-AzResourceGroup
-Name <string>
[-SubscriptionId <string>]
[-Profile <string>]
[<CommonParameters>]
Description
Display information about a resource group including its name, location, provisioning state, and resource count. Specify the resource group name and optionally the subscription ID (defaults to current subscription if not provided).
Examples
Show a resource group
Return the properties of the resource group myrg in the specified subscription.
Get-AzResourceGroup -SubscriptionId 00000000-0000-0000-0000-000000000000 -Name myrg
List all resource groups in a subscription
List every resource group in the specified subscription. Omit -Name to list rather than fetch.
Get-AzResourceGroup -SubscriptionId 00000000-0000-0000-0000-000000000000
Parameters
-Name
The name of the resource group.
Parameter properties
| Type: | String |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
Get
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Profile
Name of a saved profile to use for this call instead of the currently-active one. Manage profiles with Set-AzProfile / Get-AzProfile.
Parameter properties
| Type: | String |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-SubscriptionId
Azure Subscription Id. Defaults to the active profile's subscription.
Parameter properties
| Type: | String |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
Get
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
List
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| 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.
Outputs
Microsoft.Azure.Azclips.Extensions.Resources.Models.ResourceGroup
One ResourceGroup object per matching group — a single result when -Name is supplied (Get mode), an array of results otherwise (List mode). Includes the name, location, provisioning state, and tags.