Get-AzAdvisorConfiguration

Get the Azure Advisor configurations for the given subscription or resource group.

Syntax

Get-AzAdvisorConfiguration
   [-ResourceGroupName <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The configurations associated with a subscription have two types:

Subscription level configuration: There can be only one configuration of this type for a subscription. LowCpuThreshold and Exclude are the only property of this type of configuration.

ResourceGroup level configuration: There can be only one configuration for each ResourceGroup in a subscription. Exclude is the only property of this type of configuration.

Examples

Example 1

PS C:\>$data = Get-AzAdvisorConfiguration
Id         : /subscriptions/{user_subscription}/providers/Microsoft.Advisor/configurations/{user_subscription}
Name       : {user_subscription}
Properties : Microsoft.Azure.Commands.Advisor.Cmdlets.Models.PsAzureAdvisorConfigurationProperties
Type       : Microsoft.Advisor/Configurations

Id         : /subscriptions/{user_subscription}/providers/Microsoft.Advisor/configurations/{user_subscription}-{resourceGroupName}
Name       : {user_subscription}-{resourceGroupName}
Properties : Microsoft.Azure.Commands.Advisor.Cmdlets.Models.PsAzureAdvisorConfigurationProperties
Type       : Microsoft.Advisor/Configurations

PS C:\>$data[0].Properties
AdditionalProperties :
Exclude              : False
LowCpuThreshold      : 20

PS C:\>$data[1].Properties
AdditionalProperties :
Exclude              : True
LowCpuThreshold      : null

Retrieves a list of Azure Advisor Configuration(s).

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

Resource Group name of the configuration

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

Inputs

None

Outputs

PsAzureAdvisorConfigurationData