Enable-AzAdvisorRecommendation
Enables Azure Advisor recommendation(s).
Syntax
Enable-AzAdvisorRecommendation
-ResourceId <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[-Confirm]
[-WhatIf]
[<CommonParameters>]
Enable-AzAdvisorRecommendation
-InputObject <IAdvisorIdentity>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[-Confirm]
[-WhatIf]
[<CommonParameters>]
Enable-AzAdvisorRecommendation
-RecommendationName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[-Confirm]
[-WhatIf]
[<CommonParameters>]
Description
Enables Azure Advisor recommendation(s).
Examples
Example 1: Enable recommendation by resource Id
Enable-AzAdvisorRecommendation -ResourceId /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/automanagehcrprg/providers/microsoft.compute/virtualmachines/arcbox-capi-mgmt/providers/Microsoft.Advisor/recommendations/42963553-61de-5334-2d2e-47f3a0099d41
Name Category Resource Group Impact ImpactedField
---- -------- -------------- ------ -------------
42963553-61de-5334-2d2e-47f3a0099d41 Security automanagehcrprg High Microsoft.Compute/virtualMachines
Enable recommendation by resource Id
Example 2: Enable recommendation byrecommendation name
Enable-AzAdvisorRecommendation -RecommendationName 42963553-61de-5334-2d2e-47f3a0099d41
Name Category Resource Group Impact ImpactedField
---- -------- -------------- ------ -------------
42963553-61de-5334-2d2e-47f3a0099d41 Security automanagehcrprg High Microsoft.Compute/virtualMachines
Enable recommendation byrecommendation name
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
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 |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
The powershell object type PsAzureAdvisorResourceRecommendationBase returned by Get-AzAdvisorRecommendation call. To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: | IAdvisorIdentity |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RecommendationName
ResourceName of the recommendation.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
Id of the recommendation to be suppressed.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
The Azure subscription ID.
Type: | String[] |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
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 |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
Notes
ALIASES
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
INPUTOBJECT <IAdvisorIdentity>
: The powershell object type PsAzureAdvisorResourceRecommendationBase returned by Get-AzAdvisorRecommendation call.
[ConfigurationName <ConfigurationName?>]
: Advisor configuration name. Value must be 'default'[Id <String>]
: Resource identity path[Name <String>]
: Name of metadata entity.[OperationId <String>]
: The operation ID, which can be found from the Location field in the generate recommendation response header.[RecommendationId <String>]
: The recommendation ID.[ResourceGroup <String>]
: The name of the Azure resource group.[ResourceUri <String>]
: The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies.[SubscriptionId <String>]
: The Azure subscription ID.
Tilbakemeldinger
Send inn og vis tilbakemelding for