Get-​Azure​Rm​Resource

Gets resources.

Syntax

Get-AzureRmResource
   [-ApiVersion <String>]
   [-ExpandProperties]
   [-ExtensionResourceName <String>]
   [-ExtensionResourceType <String>]
   [-IsCollection]
   [-ODataQuery <String>]
   [-Pre]
   -ResourceName <String>
   -ResourceType <String>
   [-TenantLevel]
   [<CommonParameters>]
Get-AzureRmResource
   [-ApiVersion <String>]
   [-ExpandProperties]
   [-ExtensionResourceName <String>]
   [-ExtensionResourceType <String>]
   [-IsCollection]
   [-ODataQuery <String>]
   [-Pre]
   [-ResourceName <String>]
   [-ResourceType <String>]
   [-TenantLevel]
   [-Top <Int32>]
   [<CommonParameters>]
Get-AzureRmResource
   [-ApiVersion <String>]
   [-ExpandProperties]
   [-ExtensionResourceName <String>]
   [-ExtensionResourceType <String>]
   [-IsCollection]
   [-ODataQuery <String>]
   [-Pre]
   [-ResourceGroupName <String>]
   [-ResourceName <String>]
   [<CommonParameters>]
Get-AzureRmResource
   [-ApiVersion <String>]
   [-ExpandProperties]
   [-ExtensionResourceName <String>]
   [-ExtensionResourceType <String>]
   [-IsCollection]
   [-ODataQuery <String>]
   [-Pre]
   [-ResourceName <String>]
   [-ResourceType <String>]
   [<CommonParameters>]
Get-AzureRmResource
   [-ApiVersion <String>]
   [-ExpandProperties]
   [-ExtensionResourceName <String>]
   [-ExtensionResourceType <String>]
   [-ODataQuery <String>]
   [-Pre]
   -ResourceGroupName <String>
   -ResourceName <String>
   -ResourceType <String>
   [<CommonParameters>]
Get-AzureRmResource
   [-ApiVersion <String>]
   [-ExpandProperties]
   [-ExtensionResourceName <String>]
   [-ExtensionResourceType <String>]
   [-ODataQuery <String>]
   [-Pre]
   -ResourceGroupName <String>
   -ResourceName <String>
   -ResourceType <String>
   [<CommonParameters>]
Get-AzureRmResource
   [-ApiVersion <String>]
   [-ExpandProperties]
   [-ExtensionResourceType <String>]
   [-IsCollection]
   [-ODataQuery <String>]
   [-Pre]
   [-ResourceGroupName <String>]
   [-ResourceType <String>]
   [<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.

Required Parameters

-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
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceName
Type:String
Aliases:Name
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceType
Type:String
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

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