0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

MacにAzure Power Shellを入れる

Posted at

概要

タイトル通りですが、Mac(MacBook Air)からPower Shellを使ってAzureを操作する方法の備忘録

環境

MacBook Air M2, 2022

手順

Microsoft Learnに記載の手順に沿って作業を進めます。

Power Shellをインストールする

Microsoft LearnのmacOS への PowerShell のインストールに手順が記載されています。

いろいろな手順がありますが、直接ダウンロードしてインストールする方法を取りました。
こちら

私が使っているのはMacBook AirでApple M2搭載なので、Armのパッケージをダウンロードしました。
ダウンロード後、Finderでパッケージファイルをcontrolキーを押しながらクリックし、コンテキストメニューから「開く」を選択します。

以下のような画面が表示されるので、「開く」をクリックします。
image.png

インストーラーが起動してきます。指示に従ってインストールを進めます。
image.png

image.png

image.png

Azure PowerShell モジュールのインストール

Power Shellを起動します。
Launchpadから、Power Shellのアイコンをクリックします。
image.png

image.png

以下のコマンドを実行します。

> Install-Module -Name Az -Repository PSGallery -Force

Azureにログインしてみる

以下のコマンドを実行します。

> Connect-AzAccount

ブラウザが起動するので、Azureのログインを行なってください。
ログインが完了すると、以下のような表示になるので、ブラウザを閉じます。
image.png

Power Shellに戻ると、以下のように表示されます。
image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?