0
0
Azurecloud~30 mins

Azure Advisor recommendations - Mini Project: Build & Apply

Choose your learning style9 modes available
Azure Advisor Recommendations Setup
📖 Scenario: You are managing an Azure subscription and want to use Azure Advisor to get personalized best practice recommendations. These recommendations help optimize your resources for cost, security, reliability, operational excellence, and performance.
🎯 Goal: Set up a simple Azure Advisor configuration to retrieve and display recommendations for your subscription using Azure CLI commands in a script.
📋 What You'll Learn
Create a variable to hold your Azure subscription ID.
Create a variable to specify the recommendation category to filter.
Write a command to list Azure Advisor recommendations filtered by the category.
Add a command to show details of a specific recommendation.
💡 Why This Matters
🌍 Real World
Azure Advisor helps cloud administrators optimize their Azure resources by providing actionable recommendations.
💼 Career
Knowing how to programmatically access Azure Advisor recommendations is useful for cloud engineers and administrators to automate cost and security optimizations.
Progress0 / 4 steps
1
Set Azure Subscription ID
Create a variable called subscription_id and set it to the exact string "12345678-1234-1234-1234-123456789abc" representing your Azure subscription ID.
Azure
Need a hint?

The subscription ID is a string in quotes. Assign it exactly as given.

2
Set Recommendation Category Filter
Create a variable called recommendation_category and set it to the exact string "Cost" to filter Azure Advisor recommendations by cost category.
Azure
Need a hint?

The category is a string and must match exactly "Cost".

3
List Azure Advisor Recommendations
Write a command string called list_recommendations_cmd that uses az advisor recommendation list with the subscription ID and filters by the recommendation category variable. The command should be exactly: az advisor recommendation list --subscription {subscription_id} --category {recommendation_category} using f-string formatting.
Azure
Need a hint?

Use an f-string to insert variables into the command string exactly as shown.

4
Show Details of a Specific Recommendation
Create a command string called show_recommendation_cmd that uses az advisor recommendation show with the subscription ID and a recommendation ID variable called recommendation_id. Set recommendation_id to the exact string "1234abcd-12ab-34cd-56ef-1234567890ab". The command should be exactly: az advisor recommendation show --subscription {subscription_id} --recommendation-id {recommendation_id} using f-string formatting.
Azure
Need a hint?

Assign the recommendation ID string exactly and use an f-string to build the show command.