Enable-AzAdvisorRecommendation
Enables Azure Advisor recommendation(s).
Syntax
Enable-AzAdvisorRecommendation
-ResourceId <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Enable-AzAdvisorRecommendation
[-SubscriptionId <String[]>]
-RecommendationName <String>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Enable-AzAdvisorRecommendation
[-SubscriptionId <String[]>]
-InputObject <IAdvisorIdentity>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<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 |
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 |
-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 |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RecommendationName
ResourceName of the recommendation.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
Id of the recommendation to be suppressed.
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
Outputs
Azure PowerShell