Set-AzAdvisorConfiguration
Updates or creates the Azure Advisor Configuration.
Syntax
CreateByLCT (Default)
Set-AzAdvisorConfiguration
[-SubscriptionId <String>]
[-Exclude]
[-LowCpuThreshold <CpuThreshold>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
CreateByRG
Set-AzAdvisorConfiguration
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-Exclude]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzAdvisorConfiguration
-InputObject <IAdvisorIdentity>
[-Exclude]
[-LowCpuThreshold <CpuThreshold>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Updates or creates the Azure Advisor Configuration.
Examples
Example 1: Set advisor configuration by subscription id
Set-AzAdvisorConfiguration -Exclude -LowCpuThreshold 20
Name Exclude LowCpuThreshold
---- ------- ---------------
default True 20
Set advisor configuration by subscription id
Example 2: Set advisor configuration by resource group name
Set-AzAdvisorConfiguration -Exclude
Name Exclude LowCpuThreshold
---- ------- ---------------
default True
Set advisor configuration by resource group name
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Exclude
Exclude the resource from Advisor evaluations.
Valid values: False (default) or True.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: IAdvisorIdentity
Default value: None
Supports wildcards: False
DontShow: False
CreateByInputObject
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-LowCpuThreshold
Minimum percentage threshold for Advisor low CPU utilization evaluation.
Valid only for subscriptions.
Valid values: 5 (default), 10, 15 or 20.
Parameter properties
Type: CpuThreshold
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
CreateByLCT
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateByInputObject
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the Azure resource group.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
CreateByRG
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
The Azure subscription ID.
Parameter properties
Type: String
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
CreateByLCT
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateByRG
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs