Editar

Compartir a través de


Set-AzAdvisorConfiguration

Updates or creates the Azure Advisor Configuration.

Syntax

Set-AzAdvisorConfiguration
   [-SubscriptionId <String>]
   [-Exclude]
   [-LowCpuThreshold <CpuThreshold>]
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzAdvisorConfiguration
   [-SubscriptionId <String>]
   -ResourceGroupName <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.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

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

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Exclude

Exclude the resource from Advisor evaluations. Valid values: False (default) or True.

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

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Type:IAdvisorIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-LowCpuThreshold

Minimum percentage threshold for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 5 (default), 10, 15 or 20.

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

-ResourceGroupName

The name of the Azure resource group.

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

-SubscriptionId

The Azure subscription ID.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

IAdvisorIdentity

Outputs

IConfigData