Bird
Raised Fist0
Azurecloud~5 mins

Azure Advisor recommendations - Commands & Configuration

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
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.

Practice

(1/5)
1. What is the main purpose of Azure Advisor?
easy
A. To monitor network traffic in real-time
B. To provide personalized recommendations to optimize your Azure resources
C. To create new Azure resources automatically
D. To manage user access and permissions

Solution

  1. Step 1: Understand Azure Advisor's role

    Azure Advisor analyzes your Azure resources and suggests improvements.
  2. Step 2: Compare options with Advisor's function

    Only To provide personalized recommendations to optimize your Azure resources matches the purpose of giving personalized recommendations.
  3. Final Answer:

    To provide personalized recommendations to optimize your Azure resources -> Option B
  4. Quick Check:

    Advisor = personalized recommendations [OK]
Hint: Advisor gives tips to improve, not create or monitor [OK]
Common Mistakes:
  • Confusing Advisor with monitoring tools
  • Thinking Advisor manages user permissions
  • Assuming Advisor creates resources automatically
2. Which Azure CLI command shows Advisor recommendations for your subscription?
easy
A. az advisor recommendation list
B. az vm list
C. az network watcher show
D. az storage account create

Solution

  1. Step 1: Identify command for Advisor recommendations

    The command az advisor recommendation list lists Advisor tips.
  2. Step 2: Check other commands' purposes

    Other commands manage VMs, network watcher, or storage, unrelated to Advisor.
  3. Final Answer:

    az advisor recommendation list -> Option A
  4. Quick Check:

    Advisor recommendations = az advisor recommendation list [OK]
Hint: Look for 'advisor' in the command for recommendations [OK]
Common Mistakes:
  • Using VM or storage commands instead of Advisor
  • Confusing network watcher with Advisor
  • Missing 'recommendation' keyword in command
3. You run az advisor recommendation list --category Performance. What will you see?
medium
A. List of all security alerts
B. Network traffic statistics
C. Details of billing invoices
D. Recommendations to improve your resource performance

Solution

  1. Step 1: Understand the command filter

    The command filters Advisor recommendations by the Performance category.
  2. Step 2: Match output with options

    Only Recommendations to improve your resource performance describes performance improvement tips, matching the command.
  3. Final Answer:

    Recommendations to improve your resource performance -> Option D
  4. Quick Check:

    Performance category = performance tips [OK]
Hint: Filter by category shows matching recommendations [OK]
Common Mistakes:
  • Expecting security alerts instead of performance tips
  • Confusing billing info with Advisor output
  • Thinking network stats appear in Advisor list
4. You tried to run az advisor recommendation list --category cost but got an error. What is a likely cause?
medium
A. The Azure CLI is not installed
B. Your Azure subscription has no resources
C. You misspelled the category name; it should be 'Cost' with capital C
D. The command requires administrator privileges

Solution

  1. Step 1: Check category name case sensitivity

    Azure CLI commands often require exact category names; 'cost' should be 'Cost'.
  2. Step 2: Evaluate other options

    Subscription without resources or CLI not installed cause different errors; admin rights not needed.
  3. Final Answer:

    You misspelled the category name; it should be 'Cost' with capital C -> Option C
  4. Quick Check:

    Category names are case-sensitive [OK]
Hint: Check exact spelling and case of category names [OK]
Common Mistakes:
  • Ignoring case sensitivity in command options
  • Assuming admin rights are required
  • Thinking no resources means no command output error
5. Your company wants to reduce Azure costs and improve security. How can Azure Advisor help you achieve both?
hard
A. By providing cost-saving and security improvement recommendations for your resources
B. By automatically deleting unused resources
C. By increasing the size of all virtual machines
D. By disabling all network traffic temporarily

Solution

  1. Step 1: Identify Advisor's recommendation scope

    Azure Advisor gives tips on cost savings and security improvements based on your resource usage.
  2. Step 2: Evaluate other options for feasibility

    Advisor does not delete resources, resize VMs automatically, or disable network traffic.
  3. Final Answer:

    By providing cost-saving and security improvement recommendations for your resources -> Option A
  4. Quick Check:

    Advisor = cost + security tips [OK]
Hint: Advisor suggests actions; it doesn't change resources automatically [OK]
Common Mistakes:
  • Thinking Advisor deletes or changes resources automatically
  • Confusing Advisor with network management tools
  • Assuming Advisor disables services to save costs