#AzCLI
For the past five years, I've been the lead technical writer for #Azure #PowerShell documentation at Microsoft. As of today, I'm now leading documentation efforts for both Azure CLI: aka.ms/azcli and Azure PowerShell: aka.ms/azps
Azure Command-Line Interface (CLI) - Overview
Learn how to get started with the Azure Command-Line Interface (CLI) to create and manage Azure resources — explore guides, tutorials, samples, articles, and more.
aka.ms
April 14, 2025 at 3:57 PM
The latest version of azcli or kubectl or something broke my kubeconfig integration with 1password. Sigh.
February 24, 2025 at 8:26 PM
As one working on Azure Local I hate azcli. I does use incompativle API versions sometimes (and fails) and is very slow. And its just Python using REST. Please just let me just use PowerShell using REST on its own. Its less complicate.
May 8, 2025 at 9:18 PM
Playing around with #Azure Bastion and #azcli reminds me of the beginning of my IT career. I used SSH tunneling to tunnel the web interface to my localhost back in the time. Now it’s CLI that tunnels RDP for me.
March 16, 2025 at 7:55 AM
There seems to be an issue with hosted agents on Azure DevOps Pipelines and GitHub Actions. An error occurs when using ubuntu-latest and the Azure CLI task to deploy Bicep files:

ERROR: [Errno 2] No such file or directory: '/home/vsts/work/_temp/.azclitask/bin/bicep'

github.com/Azure/azure-...
Az bicep lint throws NotFound Exception Error on Microsoft hosted build-agent (Azure Pipelines) when using AzCli tasks · Issue #31226 · Azure/azure-cli
Describe the bug Running az bicep lint via the AzCLI task in ADO is failing with an error. This job was working fine until the last hour or so and just stopped working. ADO Logs: az bicep lint --fi...
github.com
April 11, 2025 at 8:11 AM
Yeh, I was getting annoyed with the prompting while working on some aks clsuter, updated AzCLI and then it allll went wrong. was about to log a git issue, when someone internally at work was like did you update your extensions 🤪

Thanks @whaakman.bsky.social for the tip! #Azure
November 11, 2024 at 2:51 PM
Azure Resource Graph is one of the most underrated Azure features.

Quick walkthrough on pulling inventory across subscriptions with Resource Graph Explorer and AzCLI...and finding the mystery resources nobody recognizes.

www.shankuehn.io/post/azure-i...

#Azure #Cloud
Azure Inventory in a Hurry: How to Pull Your Full Estate Across Subscriptions Fast
This topic comes up constantly.Sometimes it's at the start of a discovery conversation before we get into modernization, governance, platform engineering strategy, security, or cost optimization. Some...
www.shankuehn.io
May 28, 2026 at 2:43 PM
Looked simple on paper. Reality? Approvals, retries, and angry routes before my Azure subnet router finally behaved. Now the tailnet stretches clean across on-prem + cloud. Part 2 blog with the scars included.

#tailscale #azure #azcli

👉 www.shankuehn.io/post/site-to...
Site to Site Networking with Tailscale: Part 2 — Teaching Azure Some New Tricks
In Part 1, I wrestled my Unifi Dream Machine Pro into submission and got it talking on Tailscale. That gave me a subnet router for my home LAN (192.168.1.0/24). Now it is time to bring Azure into the ...
www.shankuehn.io
September 1, 2025 at 2:00 AM
Create Azure backup of VM using Automation script in AzCli
echo "Logging In...." az login --service-principal -u $Clientid -p $Clientsecret --tenant $Tenantid az account set -s "ba-ib-at23055-neu-dev" RecoveryServicesVault="at23055vault-test" resourceGroup="AT23055_DRMDASHBOARD_DEV" vmName="xd934b23055dev2" az backup vault show --name $RecoveryServicesVault --resource-group $resourceGroup retVal=$? if [ $retVal -eq 0 ]; then echo "Vault Exists Already" else echo "Vault doesn't Exist!" echo "Creating a new Vault.." az backup vault create --resource-group $resourceGroup \ --name $RecoveryServicesVault \ --location northeurope fi az backup vault backup-properties set \ --name $RecoveryServicesVault \ --resource-group $resourceGroup \ --backup-storage-redundancy "LocallyRedundant" #GeoRedundant az backup protection check-vm --resource-group $resourceGroup --vm $vmName if [ $retVal -eq 0 ]; then echo "Virtual machine is protected Already" else echo "Virtual machine is not protected" echo "Creating Virtual machine Protection..." az backup protection enable-for-vm \ --resource-group $resourceGroup \ --vault-name $RecoveryServicesVault \ --vm $vmName \ --policy-name DefaultPolicy fi retention=`date +'%d-%m-%Y' -d "+1 year"` count=$(az backup job list --resource-group $resourceGroup --vault-name $RecoveryServicesVault --output table | grep -i 'InProgress' | wc -l) if [ $count -gt 0 ]; then echo "Backup is InProgress, Unable to initiate backup as another backup operation is currently in progress." echo "Checking the status of backup jobs..." az backup job list \ --resource-group $resourceGroup \ --vault-name $RecoveryServicesVault \ --output table exit 0 else echo "Initiating backup job.." az backup protection backup-now \ --resource-group $resourceGroup \ --vault-name $RecoveryServicesVault \ --container-name $vmName \ --item-name $vmName \ --backup-management-type AzureIaaSVM \ --retain-until $retention fi echo "Checking the status of backup jobs..." az backup job list \ --resource-group $resourceGroup \ --vault-name $RecoveryServicesVault \ --output table Please find below the concise explanation of the provided code snippet that is intended to manage Azure backup vaults and virtual machines using the Azure CLI: Explanation of the Code 1. Login to Azure: echo "Logging In...." az login --service-principal -u $Clientid -p $Clientsecret --tenant $Tenantid This logs into Azure using a service principal (a special Azure account typically used for automated scripts). It uses the client ID, client secret, and tenant ID provided in the variables. 1. Set the Azure Account: az account set -s "<Subscription_ID>" Sets the specific Azure subscription to use for the subsequent commands. 1. Define Variables: RecoveryServicesVault="vault-test" resourceGroup="RG_DEV" vmName="xdvmdev2" These lines define variables for the recovery services vault name, resource group, and virtual machine name. 1. Check if the Backup Vault Exists: az backup vault show --name $RecoveryServicesVault --resource-group $resourceGroup retVal=$? if [ $retVal -eq 0 ]; then echo "Vault Exists Already" else echo "Vault doesn't Exist!" echo "Creating a new Vault.." az backup vault create --resource-group $resourceGroup \ --name $RecoveryServicesVault \ --location northeurope fi * It checks if the specified backup vault exists. * If it does, it confirms its existence; if not, it creates a new backup vault in the specified location. 1. Set Backup Properties: az backup vault backup-properties set \ --name $RecoveryServicesVault \ --resource-group $resourceGroup \ --backup-storage-redundancy "LocallyRedundant" This sets the backup storage redundancy to "LocallyRedundant," meaning that the backups will be stored in a way that protects them from local failures. 1. Check VM Backup Protection Status: az backup protection check-vm --resource-group $resourceGroup --vm $vmName This checks if the specified virtual machine is already protected by the backup vault. 1. Enable VM Protection if Not Already Protected: if [ $retVal -eq 0 ]; then echo "Virtual machine is protected Already" else echo "Virtual machine is not protected" echo "Creating Virtual machine Protection..." az backup protection enable-for-vm \ --resource-group $resourceGroup \ --vault-name $RecoveryServicesVault \ --vm $vmName \ --policy-name DefaultPolicy fi If the VM is not protected, it enables backup protection for the VM with the default policy. 1. Initiate Backup Job: retention=`date +'%d-%m-%Y' -d "+1 year"` count=$(az backup job list --resource-group $resourceGroup --vault-name $RecoveryServicesVault --output table | grep -i 'InProgress' | wc -l) if [ $count -gt 0 ]; then echo "Backup is InProgress, Unable to initiate backup as another backup operation is currently in progress." echo "Checking the status of backup jobs..." az backup job list \ --resource-group $resourceGroup \ --vault-name $RecoveryServicesVault \ --output table exit 0 else echo "Initiating backup job.." az backup protection backup-now \ --resource-group $resourceGroup \ --vault-name $RecoveryServicesVault \ --container-name $vmName \ --item-name $vmName \ --backup-management-type AzureIaaSVM \ --retain-until $retention fi * It defines a retention policy by calculating a date one year from now. * It checks if another backup job is in progress. If so, it displays the active jobs and exits. * If no jobs are in progress, it initiates a new backup job for the VM. 1. Check Backup Job Status: echo "Checking the status of backup jobs..." az backup job list \ --resource-group $resourceGroup \ --vault-name $RecoveryServicesVault \ --output table Finally, it retrieves and displays the status of all backup jobs associated with the vault. ## Summary This script automates the process of logging into Azure, checking or creating a backup vault, managing the backup protection of a specified VM, and initiating a backup job, while also checking for existing operations to avoid conflicts.
forem.com
March 31, 2025 at 8:44 PM
🚨New #Azure #AZCLI 2.80 has been released about a week ago. Are you up to date?
bit.ly/4ol87pc
November 26, 2025 at 7:22 AM
Az CLI on Windows: where az login turns into chaos engineering. where.exe az found the culprit, cleanup fixed it.

#azcli #windows #dllnotfound

www.shankuehn.io/post/when-az...
When Az CLI and Windows Stop Playing Nice
Shannon's Disclaimer: All code for this blog can be found here. I'm going to start out code based blogs with their own repo and will clean up older blog posts as time allows.If you spend enough time w...
www.shankuehn.io
September 11, 2025 at 6:49 PM
👑New Blog post

This guide covers:

✅ Generating and applying new keys seamlessly for new user.

📖 Read the full post here: mmachniak.net/2024/12/02/A...

#Azure #CyberSecurity #DevOps #CloudComputing #AzureVM #SSHKeys #Automation #AzOps #Microsoft #AzCLI
A Guide to Revoking and Reconfiguring SSH Keys on Azure VMs
In this post, you’ll learn how to securely revoke access to your Azure Virtual Machines by replacing compromised or outdated SSH keys. Whether you’re responding to a potential security breach or perfo...
mmachniak.net
December 3, 2024 at 7:45 AM
I've just published a new article about Azure CLI https://www.techwatching.dev/posts/welcome-azure-cli ! #azurecli #azcli @AzureCli Always nice to blog with #wyam :)
Goodbye Azure Portal, Welcome Azure CLI
Let's jum into Azure CLI to manage Azure resources. The article will show the syntax, the main functionalities and some less-known features like Azure CLI interactive mode.
www.techwatching.dev
November 17, 2024 at 2:03 PM