This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
Gets resource groups.
Get-AzResourceGroup [[-Name] <String>] [[-Location] <String>] [-Tag <Hashtable>] [-ExpandProperties] [-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]Get-AzResourceGroup [[-Location] <String>] [-Id <String>] [-ExpandProperties] [-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]TheGet-AzResourceGroup cmdlet gets Azure resource groups in the current subscription.You can get all resource groups, or specify a resource group by name or by other properties.By default, this cmdlet gets all resource groups in the current subscription.For more information about Azure resources and Azure resource groups, see the New-AzResourceGroup cmdlet.
Get-AzResourceGroup -Name "EngineerBlog"This command gets the Azure resource group in your subscription named EngineerBlog.
(Get-AzResourceGroup -Name "ContosoRG").TagsThis command gets the resource group named ContosoRG, and displays the tags associated with that group.
Get-AzResourceGroup -Tag @{'environment'='prod'}Get-AzResourceGroup | Sort-Object Location,ResourceGroupName | Format-Table -GroupBy Location ResourceGroupName,ProvisioningState,TagsGet-AzResourceGroup -Location westus2 | Sort-Object ResourceGroupName | Format-Wide ResourceGroupName -Column 4Get-AzResourceGroup -Name WebServer*Get-AzResourceGroup -Name "ContosoRG" -ExpandPropertiesSpecifies the API version that is supported by the resource Provider.You can specify a different version than the default version.
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
The credentials, account, tenant, and subscription used for communication with azure
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
When specified, output includes CreatedTime and ChangedTime of a resource.
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
Specifies the ID of the resource group to get.Wildcard characters are not permitted.
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ResourceGroupId, ResourceId |
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
Specifies the location of the resource group to get.
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Position: | 1 |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
Specifies the name of the resource group to get. This parameter supports wildcards at the beginning and/or the end of the string.
| Type: | String |
| Default value: | None |
| Supports wildcards: | True |
| DontShow: | False |
| Aliases: | ResourceGroupName |
| Position: | 0 |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
Indicates that this cmdlet considers pre-release API versions when it automatically determines which version to use.
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
The tag hashtable to filter resource groups by.
| Type: | Hashtable |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, seeabout_CommonParameters.
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?
Was this page helpful?
Want to try using Ask Learn to clarify or guide you through this topic?