Get-AzureRmResource

Gets resources.

Syntax

Get-AzureRmResource -ResourceGroupName <String> -ResourceType <String> [-ApiVersion <String>]
 [-ExpandProperties] [-ExtensionResourceName <String>] [-ExtensionResourceType <String>] [-ODataQuery <String>]
 [-Pre] -ResourceName <String> [<CommonParameters>]
Get-AzureRmResource -ResourceGroupName <String> -ResourceType <String> [-ApiVersion <String>]
 [-ExpandProperties] [-ExtensionResourceName <String>] [-ExtensionResourceType <String>] [-ODataQuery <String>]
 [-Pre] -ResourceName <String> [<CommonParameters>]
Get-AzureRmResource [-ResourceGroupName <String>] [-ApiVersion <String>] [-ExpandProperties]
 [-ExtensionResourceName <String>] [-ExtensionResourceType <String>] [-IsCollection] [-ODataQuery <String>]
 [-Pre] [-ResourceName <String>] [<CommonParameters>]
Get-AzureRmResource [-ResourceGroupName <String>] [-ResourceType <String>] [-ApiVersion <String>]
 [-ExpandProperties] [-ExtensionResourceType <String>] [-IsCollection] [-ODataQuery <String>] [-Pre]
 [<CommonParameters>]
Get-AzureRmResource [-ResourceType <String>] [-ApiVersion <String>] [-ExpandProperties]
 [-ExtensionResourceName <String>] [-ExtensionResourceType <String>] [-IsCollection] [-ODataQuery <String>]
 [-Pre] [-ResourceName <String>] [<CommonParameters>]
Get-AzureRmResource [-ResourceType <String>] [-ApiVersion <String>] [-ExpandProperties]
 [-ExtensionResourceName <String>] [-ExtensionResourceType <String>] [-IsCollection] [-ODataQuery <String>]
 [-Pre] [-ResourceName <String>] [-TenantLevel] [-Top <Int32>] [<CommonParameters>]
Get-AzureRmResource -ResourceType <String> [-ApiVersion <String>] [-ExpandProperties]
 [-ExtensionResourceName <String>] [-ExtensionResourceType <String>] [-IsCollection] [-ODataQuery <String>]
 [-Pre] -ResourceName <String> [-TenantLevel] [<CommonParameters>]
Get-AzureRmResource [-ApiVersion <String>] [-ExpandProperties] [-ODataQuery <String>] [-Pre]
 -ResourceId <String> [<CommonParameters>]

Description

The Get-AzureRmResource cmdlet gets Azure resources.

Examples

Example 1: Get a resource

PS C:\>Get-AzureRmResource -ResourceType "microsoft.web/sites" -ResourceGroupName "ResourceGroup11" -ResourceName "ContosoWebsite"

This command gets a resource of the type microsoft.web/sites, named ContosoWebsite under ResourceGroup11.

Parameters

-ResourceGroupName
Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceType
Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ApiVersion
Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ExpandProperties
Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ExtensionResourceName
Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ExtensionResourceType
Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-IsCollection
Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ODataQuery
Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Pre
Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceId

Specifies the fully qualified resource ID, including the subscription, as in the following example:

/subscriptions/subscription ID/providers/Microsoft.Sql/servers/ContosoServer/databases/ContosoDatabase

This cmdlet gets the resource that has this ID.

Type:String
Aliases:Id
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceName
Type:String
Aliases:Name
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-TenantLevel

Indicates that this cmdlet operates at the tenant level.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Top
Type:Int32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False