マイクロソフト系技術情報 Wiki」は、「Open棟梁Project」,「OSSコンソーシアム .NET開発基盤部会」によって運営されています。

目次

概要

  • Azure Subscriptionの管理で、そろそろ必要になったので。
  • Azure PowerShellのPython版(Pythonがあれば動作する)。

詳細

インストール

Windows

  • 管理者として PowerShell を開始し、次のコマンドを実行。
    >Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'-

Linux

コチラ

WSL

Linuxと同じ方法で行ける。

インストールの確認

>az -v
azure-cli                         2.0.77
...

ログイン

Windows端末

OAuth 2.0 for Native Apps の Loopback Interface Redirection

>az login
You have logged in. Now let us find all the subscriptions to which you have access...

SSH端末

OAuth 2.0 Device Authorization Grant

>az login
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code <認証コード> to authenticate.

サブスクリプション切替

一覧

az account list --output table

選択

az account set --subscription "My Demos"

便利コマンド

subscriptionの一覧

>az account subscription list --output table

locationの一覧

>az account list-locations --output table

プロキシの設定方法

参考

Azure PowerShell

Japan Azure Technical Support Engineers' Blog

Microsoft Docs


Tags: :シェル, :インフラストラクチャ, :クラウド, :Azure


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2021-08-27 (金) 00:11:51 (967d)