< Back
Get-AzureRmResource
Post
NAME Get-AzureRmResource
SYNOPSIS
Gets resources.
SYNTAX
Get-AzureRmResource [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-ExpandProperties] [-ExtensionResourceName <String>]
[-ExtensionResourceType <String>] [-IsCollection] [-ODataQuery <String>] [-Pre] -ResourceName <String> -ResourceType <String> -TenantLevel
[<CommonParameters>]
Get-AzureRmResource [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-ExpandProperties] [-ExtensionResourceName <String>]
[-ExtensionResourceType <String>] [-IsCollection] [-ODataQuery <String>] [-Pre] [-ResourceName <String>] [-ResourceType <String>] -TenantLevel
[-Top <Int32>] [<CommonParameters>]
Get-AzureRmResource [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-ExpandProperties] [-ExtensionResourceName <String>]
[-ExtensionResourceType <String>] [-IsCollection] [-ODataQuery <String>] [-Pre] [-ResourceGroupName <String>] [-ResourceName <String>]
[<CommonParameters>]
Get-AzureRmResource [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-ExpandProperties] [-ExtensionResourceName <String>]
[-ExtensionResourceType <String>] [-IsCollection] [-ODataQuery <String>] [-Pre] [-ResourceName <String>] [-ResourceType <String>]
[<CommonParameters>]
Get-AzureRmResource [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-ExpandProperties] [-ExtensionResourceName <String>]
[-ExtensionResourceType <String>] [-ODataQuery <String>] [-Pre] -ResourceGroupName <String> -ResourceName <String> -ResourceType <String>
[<CommonParameters>]
Get-AzureRmResource [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-ExpandProperties] [-ExtensionResourceType <String>]
[-IsCollection] [-ODataQuery <String>] [-Pre] [-ResourceGroupName <String>] [-ResourceType <String>] [<CommonParameters>]
Get-AzureRmResource [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-ExpandProperties] [-ODataQuery <String>] [-Pre]
-ResourceId <String> [<CommonParameters>]
DESCRIPTION
The Get-AzureRmResource cmdlet gets Azure resources.
PARAMETERS
-ApiVersion <String>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ExpandProperties [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ExtensionResourceName <String>
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ExtensionResourceType <String>
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-IsCollection [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ODataQuery <String>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Pre [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ResourceGroupName <String>
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceId <String>
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.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceName <String>
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceType <String>
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-TenantLevel [<SwitchParameter>]
Indicates that this cmdlet operates at the tenant level.
Required? true
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Top <Int32>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
System.Management.Automation.PSObject
NOTES
Example 1: Get all the resources of a particular type
PS C:\\>Get-AzureRmResource -ResourceGroupName ResourceGroup11 -ResourceType microsoft.web/sites
This command gets a resource of the type microsoft.web/sites under ResourceGroup11.
Example 2: Get a resource by name
PS C:\\>Get-AzureRmResource -ResourceGroupName ResourceGroup11 -ResourceName ContosoWebsite
This command gets a resource named ContosoWebsite under ResourceGroup11.
Example 3: Show all the status of storage accounts in a Resource Group
PS C:\\>Get-AzureRmResource -ResourceGroupName ResourceGroup11 -ResourceType Microsoft.ClassicStorage/storageAccounts -ExpandProperties |
Select * -Expand Properties |
Sort Name |
Format-Table Name,Status*
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... rmresource
Find-AzureRmResource
Move-AzureRmResource
New-AzureRmResource
Remove-AzureRmResourceGroup
Set-AzureRmResourceGroup
SYNOPSIS
Gets resources.
SYNTAX
Get-AzureRmResource [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-ExpandProperties] [-ExtensionResourceName <String>]
[-ExtensionResourceType <String>] [-IsCollection] [-ODataQuery <String>] [-Pre] -ResourceName <String> -ResourceType <String> -TenantLevel
[<CommonParameters>]
Get-AzureRmResource [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-ExpandProperties] [-ExtensionResourceName <String>]
[-ExtensionResourceType <String>] [-IsCollection] [-ODataQuery <String>] [-Pre] [-ResourceName <String>] [-ResourceType <String>] -TenantLevel
[-Top <Int32>] [<CommonParameters>]
Get-AzureRmResource [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-ExpandProperties] [-ExtensionResourceName <String>]
[-ExtensionResourceType <String>] [-IsCollection] [-ODataQuery <String>] [-Pre] [-ResourceGroupName <String>] [-ResourceName <String>]
[<CommonParameters>]
Get-AzureRmResource [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-ExpandProperties] [-ExtensionResourceName <String>]
[-ExtensionResourceType <String>] [-IsCollection] [-ODataQuery <String>] [-Pre] [-ResourceName <String>] [-ResourceType <String>]
[<CommonParameters>]
Get-AzureRmResource [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-ExpandProperties] [-ExtensionResourceName <String>]
[-ExtensionResourceType <String>] [-ODataQuery <String>] [-Pre] -ResourceGroupName <String> -ResourceName <String> -ResourceType <String>
[<CommonParameters>]
Get-AzureRmResource [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-ExpandProperties] [-ExtensionResourceType <String>]
[-IsCollection] [-ODataQuery <String>] [-Pre] [-ResourceGroupName <String>] [-ResourceType <String>] [<CommonParameters>]
Get-AzureRmResource [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-ExpandProperties] [-ODataQuery <String>] [-Pre]
-ResourceId <String> [<CommonParameters>]
DESCRIPTION
The Get-AzureRmResource cmdlet gets Azure resources.
PARAMETERS
-ApiVersion <String>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ExpandProperties [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ExtensionResourceName <String>
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ExtensionResourceType <String>
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-IsCollection [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ODataQuery <String>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Pre [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ResourceGroupName <String>
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceId <String>
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.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceName <String>
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceType <String>
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-TenantLevel [<SwitchParameter>]
Indicates that this cmdlet operates at the tenant level.
Required? true
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Top <Int32>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
System.Management.Automation.PSObject
NOTES
Example 1: Get all the resources of a particular type
PS C:\\>Get-AzureRmResource -ResourceGroupName ResourceGroup11 -ResourceType microsoft.web/sites
This command gets a resource of the type microsoft.web/sites under ResourceGroup11.
Example 2: Get a resource by name
PS C:\\>Get-AzureRmResource -ResourceGroupName ResourceGroup11 -ResourceName ContosoWebsite
This command gets a resource named ContosoWebsite under ResourceGroup11.
Example 3: Show all the status of storage accounts in a Resource Group
PS C:\\>Get-AzureRmResource -ResourceGroupName ResourceGroup11 -ResourceType Microsoft.ClassicStorage/storageAccounts -ExpandProperties |
Select * -Expand Properties |
Sort Name |
Format-Table Name,Status*
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... rmresource
Find-AzureRmResource
Move-AzureRmResource
New-AzureRmResource
Remove-AzureRmResourceGroup
Set-AzureRmResourceGroup