A cleanup script was supposed to delete a few test resource groups in a dev subscription. It ran without errors, but the groups it deleted belonged to a staging subscription. The engineer had signed in that morning, never checked which subscription was active, and Azure CLI had quietly picked the wrong one. Nothing in the script was wrong. The context was.
Knowing how to set default subscription in Azure CLI is a small skill with a big payoff.I have seen this exact mix-up in companies with five subscriptions and in companies with fifty. You will learn how to list subscriptions, set the default, verify it, override it for one command, and protect your environments so a wrong choice cannot do real damage.