liveBook · Manning

Azure PowerShell

As explained in Practical Automation with PowerShell: Effective scripting from the console to the cloud

The Az PowerShell module is the modular Azure PowerShell package for managing Azure resources and services.

Azure PowerShell is a practical choice for automating Azure resource management when native Azure support and portability matter. The Az module reduces dependency-management complexity compared with invoking Azure CLI from Python, while PowerShell Core expands cross-platform automation coverage. It is not positioned as the best tool for statistical analysis, where Python libraries are stronger. section 1.4

A resource-provisioning workflow typically follows these steps:

  • Select a subscription, generate compliant resource names, and choose compatible regions. section 8.2.3
  • Connect interactively with Connect-AzAccount, or use credential, service-principal, or certificate-based authentication. section 8.2.3

Provisioning an automation environment

Install-Module -Name Az Install-Module -Name Az.MonitoringSolutions Import-Module -Name Az,Az.MonitoringSolutions Connect-AzAccount -Subscription $SubscriptionId New-AzResourceGroup -Name $ResourceGroupName -Location $AutomationLocation New-AzOperationalInsightsWorkspace -ResourceGroupName $ResourceGroupName -Name $WorkspaceName -Location $WorkspaceLocation New-AzAutomationAccount -ResourceGroupName $ResourceGroupName -Name $AutomationAccountName -Location $AutomationLocation -Plan Basic New-AzStorageAccount -ResourceGroupName $ResourceGroupName -AccountName $StorageAccountName -Location $AutomationLocation -SkuName Standard_LRS -AccessTier Cool

How Practical Automation with PowerShell: Effective scripting from the console to the cloud covers it

How deep it goes
Explains module setup, authentication, naming, regions, and resource creation, but does not develop reusable automation functions.
Examples
Demonstrates module installation, subscription login, timestamped naming, resource-group creation, and linked Azure services.
What it assumes
Assumes access to an Azure subscription and requires installing Az modules before connecting and creating resources.
What you can do after
Operate/configure Azure subscriptions and provision compatible Automation, monitoring, workspace, and storage resources.
How it connects
Connects PowerShell Core, Azure CLI, Python, Azure Automation, Log Analytics, and Azure Storage.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Practical Automation with PowerShell: Effective scripting from the console to the cloud. The section links point to the parts of the book it draws on.