पाठ 3 / 25

Portal, CLI, PowerShell and Infrastructure as Code

Choose the right tool for exploring, scripting and repeatable deployments.

All tools talk to Azure Resource Manager

The Azure portal, the Azure CLI (az), Azure PowerShell (Az module), the SDKs and Bicep/ARM templates all send requests to the same control plane: Azure Resource Manager (ARM). ARM authenticates you with Entra ID, checks your role assignments, applies Azure Policy and then asks the resource provider (for example Microsoft.Storage) to do the work. That is why something created in the portal shows up immediately in the CLI. Use the portal to explore and learn, the CLI or PowerShell for quick scripts, and infrastructure as code (Bicep, ARM JSON or Terraform) for anything that must be repeatable, reviewed and versioned. Azure Cloud Shell gives you a browser terminal with az and PowerShell preinstalled.

Same request, three tools

Each line creates the same storage account. Note that storage-account names must be globally unique, 3–24 lowercase letters and digits.

# Azure CLI
az storage account create -n stshopdev123 -g rg-shop-dev-cin -l centralindia --sku Standard_LRS

# Azure PowerShell
New-AzStorageAccount -Name stshopdev123 -ResourceGroupName rg-shop-dev-cin -Location centralindia -SkuName Standard_LRS

# Bicep (declarative; deployed with az deployment group create)
resource sa 'Microsoft.Storage/storageAccounts@2023-01-01' = {
  name: 'stshopdev123'
  location: 'centralindia'
  sku: { name: 'Standard_LRS' }
  kind: 'StorageV2'
}

Click-ops does not scale

Resources built only in the portal are hard to reproduce in another environment and impossible to review. Use the portal's Export template or JSON view to learn the resource shape, then move it into Bicep or Terraform.

त्वरित जाँच: Which component checks permissions and policy for every Azure management request?

  • Azure Front Door
  • Azure Monitor
  • Azure Resource Manager
  • Cloud Shell
Answer

Azure Resource Manager — Portal, CLI, PowerShell, SDKs and templates all go through Azure Resource Manager.