0
0
Azurecloud~5 mins

Azure Advisor recommendations - Commands & Configuration

Choose your learning style9 modes available
Introduction
Sometimes cloud resources are not used efficiently or securely. Azure Advisor helps by giving personalized tips to improve your Azure setup. It shows recommendations to save money, improve security, and boost performance.
When you want to find ways to reduce your Azure costs without affecting your apps.
When you need to improve the security of your Azure resources quickly.
When you want to optimize the performance of your virtual machines or databases.
When you want to follow best practices recommended by Microsoft for your Azure environment.
When you want to check if your Azure resources are configured correctly and safely.
Commands
This command lists all current Azure Advisor recommendations in a simple table format so you can see what improvements are suggested.
Terminal
az advisor recommendation list --output table
Expected OutputExpected
Category Resource RecommendationType Impact ShortDescription ---------- -------------------- ------------------------- -------- --------------------------------- Cost my-vm ShutdownUnusedVM High Consider shutting down unused VM Security my-storage-account EnableSecureTransfer Medium Enable secure transfer on storage Performance my-sql-db OptimizeIndexing Low Review indexing for better perf
--output - Formats the output; 'table' makes it easy to read in the terminal
This command shows detailed information about a specific recommendation using its unique ID, so you understand what action to take.
Terminal
az advisor recommendation show --recommendation-id 12345678-1234-1234-1234-123456789abc
Expected OutputExpected
Id: 12345678-1234-1234-1234-123456789abc Category: Cost Impact: High ShortDescription: Consider shutting down unused VM ImpactedResource: /subscriptions/abc/resourceGroups/my-rg/providers/Microsoft.Compute/virtualMachines/my-vm ExtendedProperties: - Property: EstimatedMonthlySavings Value: $50 - Property: ImpactedResourceType Value: Microsoft.Compute/virtualMachines RecommendationType: ShutdownUnusedVM
This command dismisses a recommendation you do not want to act on now, with a note explaining why, so it does not keep showing up.
Terminal
az advisor recommendation dismiss --recommendation-id 12345678-1234-1234-1234-123456789abc --notes "Not applicable currently"
Expected OutputExpected
Recommendation 12345678-1234-1234-1234-123456789abc dismissed successfully.
--notes - Adds a reason for dismissing the recommendation
Key Concept

If you remember nothing else from this pattern, remember: Azure Advisor gives easy-to-understand tips to improve your cloud setup based on your actual usage.

Common Mistakes
Ignoring the recommendation IDs and trying to dismiss or show recommendations without specifying the correct ID.
The commands require the exact recommendation ID to work; without it, the command fails or affects the wrong resource.
Always list recommendations first to get the correct ID, then use that ID in show or dismiss commands.
Not using the --output flag and getting JSON output that is hard to read.
JSON output is verbose and not user-friendly for quick checks in the terminal.
Use --output table for a clean, readable summary of recommendations.
Summary
Use 'az advisor recommendation list' to see all improvement suggestions for your Azure resources.
Use 'az advisor recommendation show' with a recommendation ID to get detailed advice on a specific issue.
Use 'az advisor recommendation dismiss' to remove recommendations that are not relevant to your situation.