Chapter 14 of 21
Azure Management Tools: Portal, CLI, PowerShell, and ARM Templates
Watch how different Azure management tools fit together—from point-and-click in the portal to repeatable deployments with templates.
Big Picture: The Four Azure Management Tools
The Canonical Four Tools
You must memorize this exact list of Azure management tools: 1) Azure portal, 2) Azure PowerShell, 3) Azure Command-Line Interface (CLI), 4) Azure Resource Manager templates.
All Talk to Azure Resource Manager
All four tools send requests to Azure Resource Manager (ARM), which checks permissions and policies, then creates or updates Azure resources.
Quick Mental Model
Portal = GUI; PowerShell = Windows-friendly scripts; CLI = cross-platform scripts; ARM templates = infrastructure as code for repeatable deployments.
Exam Mindset
Expect scenario questions that ask which tool is best. As you learn each tool, think: when would I choose this over the others?
Azure Portal: When Point-and-Click Is Best
What Is the Azure Portal?
The Azure portal is the web-based GUI where you sign in with Microsoft Entra ID and manage subscriptions, resource groups, and resources in a browser.
When the Portal Shines
Best for learning, exploring services, viewing dashboards and charts, and making one-off or small configuration changes.
Governance in the Portal
You can view Azure Policy compliance, RBAC assignments, and Defender for Cloud recommendations directly in portal blades.
Portal Limitations
Manual clicks are slow and error-prone for repeatable deployments. The portal is weak for automation and version-controlled change tracking.
Script-Based Tools: Azure PowerShell vs Azure CLI
Two Script-Based Tools
The two command-line tools are Azure PowerShell and Azure Command-Line Interface (CLI). Both automate Azure but have different styles.
Azure PowerShell Basics
Azure PowerShell uses PowerShell cmdlets like `Get-AzVM`. It is popular with Windows administrators and PowerShell users.
Azure CLI Basics
Azure CLI is cross-platform and uses `az` commands like `az group create`. It is popular with developers and Linux/macOS users.
What They Share
Both authenticate with Microsoft Entra ID, respect RBAC and Azure Policy, and are ideal for automation and repeatable tasks.
Azure Resource Manager Templates and Infrastructure as Code
What Are ARM Templates?
Azure Resource Manager templates are JSON files that declare what resources you want. Azure Resource Manager reads them and creates or updates resources.
Infrastructure as Code
ARM templates implement infrastructure as code: your environment definition lives in code that can be versioned, reviewed, and redeployed.
Why ARM Templates Matter
They are ideal for repeatable, consistent deployments across dev, test, and production, and they are idempotent: redeploying brings resources to the desired state.
Governance Still Applies
ARM template deployments pass through RBAC and Azure Policy. Policies can deny or modify resources that do not meet your standards.
Scenario Walkthrough: Matching Tasks to Tools
Learning and One-Off Tasks
New to Azure or creating a single test resource? The Azure portal is fastest and most visual for exploration and simple, one-off tasks.
Repeatable Operational Tasks
Need to start, stop, or tag many resources on a schedule? Use Azure PowerShell or Azure CLI scripts for automation.
Consistent Environments
Need identical dev, test, and production setups? Use Azure Resource Manager templates to define the environment as code.
Platform Preferences
Windows and PowerShell background? Azure PowerShell fits. Cross-platform and bash? Azure CLI is usually the better choice.
Side-by-Side: PowerShell vs Azure CLI vs ARM Template
You will not be asked to write code on AZ-900, but seeing examples makes the differences concrete. Below, all three approaches create a resource group.
- Azure PowerShell example:
```powershell
Log in (interactive)
Connect-AzAccount
Create a resource group
New-AzResourceGroup \
-Name "rg-demo" \
-Location "westeurope"
```
- Azure CLI example:
```bash
Log in (interactive)
az login
Create a resource group
az group create \
--name rg-demo \
--location westeurope
```
- Azure Resource Manager template example (very simplified):
```json
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.Resources/resourceGroups",
"apiVersion": "2021-04-01",
"name": "rg-demo",
"location": "westeurope"
}
]
}
```
You would then deploy the template (for example, using Azure CLI):
```bash
az deployment sub create \
--location westeurope \
--template-file rg-demo.json
```
What to notice for the exam:
- PowerShell: Verb-Noun cmdlets with `-Parameters`.
- CLI: `az` commands with `--options`.
- ARM template: JSON file describing the desired resources.
You do not need to memorize syntax. You just need to recognize which style belongs to which tool and that all of them ultimately call Azure Resource Manager.
Thought Exercise: Choose the Tool
Work through these scenarios and decide which of the four canonical tools you would choose. Answer in your head or jot them down before checking the guidance below.
Remember the canonical list:
- Azure portal
- Azure PowerShell
- Azure Command-Line Interface (CLI)
- Azure Resource Manager templates
Scenario A
Your manager asks you to quickly check which resource groups exist in your subscription and to rename one of them. You rarely do this task.
- Likely choice: Azure portal (visual, occasional task).
Scenario B
You need to stop 50 virtual machines every evening at 7 PM to save costs, and start them again at 7 AM.
- Likely choice: Azure PowerShell or Azure CLI (automation, scheduling, multiple resources).
Scenario C
Your organization wants every new project to use the same baseline environment: one resource group, one virtual network, three subnets, and a storage account, all configured the same way.
- Likely choice: Azure Resource Manager templates (infrastructure as code, repeatable, consistent).
Scenario D
A Windows admin team already uses PowerShell scripts to manage on-premises servers and wants to extend those skills to Azure.
- Likely choice: Azure PowerShell (leverages existing PowerShell knowledge).
Scenario E
A cross-platform development team works mostly on macOS and Linux using bash and VS Code. They want to integrate Azure operations into their existing shell scripts.
- Likely choice: Azure Command-Line Interface (CLI) (cross-platform, `az` commands).
As you move into mock exams, this kind of reasoning is exactly what you will use. The next quiz will test you on similar patterns.
Quiz 1: Canonical Tools and High-Level Uses
Test your understanding of the four Azure management tools and their typical use cases.
Which option lists the canonical Azure management tools in the correct order required for AZ-900?
- Azure portal, Azure PowerShell, Azure Command-Line Interface (CLI), Azure Resource Manager templates
- Azure portal, Azure CLI, Azure PowerShell, Azure Resource Manager templates, Azure Policy
- Azure portal, Azure Resource Manager templates, Azure CLI, Azure PowerShell
- Azure portal, Azure PowerShell, Azure Command-Line Interface (CLI), Azure DevOps
Show Answer
Answer: A) Azure portal, Azure PowerShell, Azure Command-Line Interface (CLI), Azure Resource Manager templates
The canonical list of Azure management tools has exactly four items, in this order: 1) Azure portal, 2) Azure PowerShell, 3) Azure Command-Line Interface (CLI), 4) Azure Resource Manager templates. Azure Policy and Azure DevOps are important services but are not part of this specific list.
Quiz 2: Match Scenarios to Tools
Apply your knowledge to realistic management scenarios.
You need to deploy the same set of storage accounts, virtual networks, and virtual machines to three different environments (dev, test, production) in a consistent, repeatable way. Which tool is the BEST fit?
- Azure portal
- Azure PowerShell
- Azure Command-Line Interface (CLI)
- Azure Resource Manager templates
Show Answer
Answer: D) Azure Resource Manager templates
Azure Resource Manager templates are designed for infrastructure as code and repeatable, consistent deployments across environments. While you could script this with Azure PowerShell or Azure CLI, ARM templates are the best fit for defining full environments declaratively. The portal is not ideal for repeatable multi-environment deployments.
Flashcards: Key Azure Management Tool Concepts
Use these flashcards to reinforce the canonical list and high-level distinctions between tools.
- Canonical Azure management tools (4 items, in order)
- 1) Azure portal 2) Azure PowerShell 3) Azure Command-Line Interface (CLI) 4) Azure Resource Manager templates
- Azure portal – primary characteristics
- Web-based graphical interface; great for learning, exploration, dashboards, monitoring, and one-off or small configuration changes.
- Azure PowerShell – when to use
- Best for automation and scripting in environments where PowerShell is already used, especially by Windows administrators.
- Azure Command-Line Interface (CLI) – when to use
- Best for cross-platform automation (Windows, macOS, Linux), especially in bash or shell scripts using `az` commands.
- Azure Resource Manager templates – core idea
- JSON-based definitions of Azure resources that implement infrastructure as code for repeatable, consistent deployments.
- Infrastructure as code (IaC) – exam-level idea
- Managing and provisioning infrastructure through machine-readable definition files (like ARM templates) instead of manual configuration.
- Tool choice: one-off, visual configuration for beginners
- Azure portal
- Tool choice: scheduled start/stop of many VMs every day
- Azure PowerShell or Azure CLI (script-based automation)
- Tool choice: recreate identical environments across subscriptions
- Azure Resource Manager templates
- PowerShell vs CLI – key style difference
- Azure PowerShell uses Verb-Noun cmdlets like `New-AzVM`; Azure CLI uses `az` commands like `az vm create`.
Putting It Together: Tools, Governance, and Your Next Steps
Core Summary
Remember the canonical tools and their roles: portal for GUI, PowerShell and CLI for scripts, and ARM templates for infrastructure as code.
Control and Governance
All tools send requests to Azure Resource Manager, which enforces RBAC and Azure Policy before creating or updating resources.
Exam Strategy
In questions, watch for keywords like repeatable, script, cross-platform, or infrastructure as code to identify the right tool.
Next Steps in Skarp
Use the diagnostic, mock exams, and gap guides to reinforce any weak areas, especially around choosing the correct tool for each scenario.
Key Terms
- Azure Policy
- Azure Policy is a service in Azure that you use to create, assign, and manage policies that enforce rules and effects over your resources, so those resources stay compliant with your corporate standards and service level agreements.
- Azure portal
- The web-based graphical interface for managing Azure resources, subscriptions, and resource groups through a browser.
- Azure PowerShell
- A set of PowerShell modules that provide cmdlets for managing Azure resources from the command line or in scripts.
- Microsoft Entra ID
- Microsoft Entra ID is Microsoft’s cloud-based identity and access management service that helps employees sign in and access resources such as Microsoft 365, the Azure portal, and thousands of other SaaS applications.
- Azure Resource Manager
- The Azure control plane service that receives management requests, applies RBAC and Azure Policy, and creates or updates resources.
- infrastructure as code
- An approach where infrastructure is defined and managed using machine-readable definition files (such as ARM templates) instead of manual configuration.
- Azure Resource Manager templates
- JSON-based files that define Azure resources and their configurations, enabling infrastructure as code and repeatable deployments.
- role-based access control (RBAC)
- Role-based access control (RBAC) is an authorization system built on Azure Resource Manager that provides fine-grained access management of Azure resources based on roles assigned to users, groups, and service principals.
- Azure Command-Line Interface (CLI)
- A cross-platform command-line tool (`az`) for creating and managing Azure resources from Windows, macOS, and Linux.