0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Azure】Azure PowerShell をローカル環境にインストールする方法

Posted at

概要

Azure PowerShellをローカル環境にインストールする方法

必要条件

  • PowerShell 5.1 以上 (Windows)
  • PowerShell Core 6.x 以上 (macOS, Linux)

PowerShellのインストールはこちら
PowerShell Coreのインストールはこちら

手順

PowerShell上で以下のコマンドを実行する.

PowerShell
Install-Module -Name Az -AllowClobber

カレントユーザーにのみインストールしたい場合は以下のコマンドを実行する.

PowerShell
Install-Module -Name Az -AllowClobber -Scope CurrentUser

以下の出力が表示されるのでyをタイプする.

Output
Untrusted repository
You are installing the modules from an untrusted repository. If you 
trust this repository, change its InstallationPolicy value by running 
the Set-PSRepository cmdlet. Are you sure you want to install the 
modules from 'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help 
(default is "N"):

サインイン

以下のコマンドでサインインする.

PowerShell
Connect-AzAccount

以下のアウトプットのURLをブラウザで開いて,コードを入力する.

Output
WARNING: To sign in, use a web browser to open the page 
https://microsoft.com/devicelogin and enter the <code> to authenticate. 
スクリーンショット 2019-05-30 18.40.53.png

アップデート

以下のコマンドでアップデートする.

PowerShell
Install-Module -Name Az -AllowClobber -Force

参考

Azure 公式ドキュメント

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?