Disable-AzAdvisorRecommendation
Disable an Azure Advisor recommendation.
Syntax
Disable-AzAdvisorRecommendation
-ResourceId <String>
[-SubscriptionId <String[]>]
[-Day <Object>]
[-DefaultProfile <PSObject>]
[-Confirm]
[-WhatIf]
[<CommonParameters>]
Disable-AzAdvisorRecommendation
-InputObject <IAdvisorIdentity>
[-SubscriptionId <String[]>]
[-Day <Object>]
[-DefaultProfile <PSObject>]
[-Confirm]
[-WhatIf]
[<CommonParameters>]
Disable-AzAdvisorRecommendation
-RecommendationName <String>
[-SubscriptionId <String[]>]
[-Day <Object>]
[-DefaultProfile <PSObject>]
[-Confirm]
[-WhatIf]
[<CommonParameters>]
Description
Disable an Azure Advisor recommendation.
Examples
Example 1: Disable recommendation by recommendation name
Disable-AzAdvisorRecommendation -RecommendationName 42963553-61de-5334-2d2e-47f3a0099d41 -Day 1
SuppressionId Name Resource Group Ttl
------------- ---- -------------- ---
5b931ff3-42a3-5f80-797f-8e018a6dfaf5 HardcodedSuppressionName automanagehcrprg 1.00:00:00
Disable recommendation by recommendation name
Example 2: Disable recommendation by recommendation resource id
Disable-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 -Day 1
SuppressionId Name Resource Group Ttl
------------- ---- -------------- ---
5b931ff3-42a3-5f80-797f-8e018a6dfaf5 HardcodedSuppressionName automanagehcrprg 1.00:00:00
Disable recommendation by recommendation resource id
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 |
-Day
Days to disable.
Type: | Object |
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
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.
Feedback
Submit and view feedback for