Find-​Azure​Rm​Resource​Group

Searches for resource groups.

Syntax

Find-AzureRmResourceGroup
    [-Tag <Hashtable>]
    [-ApiVersion <String>]
    [-Pre]
    [<CommonParameters>]

Description

The Find-AzureRmResourceGroup cmdlet searches for resource groups using the specified parameters.

Examples

Example 1: Find all resource groups

PS C:\>Find-AzureRmResourceGroup

This command finds all resource groups.

Example 2: Find resource groups by tag name

PS C:\>Find-AzureRmResourceGroup -Tag @{ Name = "testtag" }

This command finds all resource groups that have a tag named testtag.

Example 3: Find resource groups by tag name and value

PS C:\>Find-AzureRmResourceGroup -Tag @{ Name = "testtag"; Value = "testval" }

This command finds all resource groups that have a tag named testtag and the value testval.

Optional Parameters

-ApiVersion

Specifies the version of the resource provider API to use. If you do not specify a version, this cmdlet uses the latest available version.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Pre

Indicates that this cmdlet considers pre-release API versions when it automatically determines which version to use.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Tag

Specifies tag information, as a hash table, to filter your results. Use the following formats: @{Name = 'tagName'} @{Name = 'tagName'; Value = 'tagValue'}

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False