如何使用 PowerShell 中的 Azure CLI 連線到 Azure 訂閱?
要使用 Az CLI 連線到特定的 Azure 訂閱,我們需要使用 “Az account set” 命令,但在此之前請確保使用 “az login” 賬戶連線 Azure 雲。
az account set --subscription 'subscription name or id'
你還可以使用 -s 代替 --subscription.
az account set -s 'subscription name or id'
要檢查訂閱是否設定正確,請使用以下命令。
PS C:\> az account show -otable
廣告