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?

More than 3 years have passed since last update.

Azure PowerShell のインストール方法

Posted at

はじめに

MS365でPowerShellによる操作を行う必要があったのですが、その時にAzurePowerShellなるものをインストールする必要があったため、備忘のため記録。

なお、Microsoftの公式サイトには一応手順はありますが、余分なものが多いので、最小限の手続きをまとめています。

前提

  • OSはMac OS Catalina
    • Windowsとは違うメッセージが出るかもしれません。

手順

PowerShellを起動

PowerShellを起動する。
ローカルユーザのみインストールであれば管理者権限は不要。

インストールコマンドを入力

if ($PSVersionTable.PSEdition -eq 'Desktop' -and (Get-Module -Name AzureRM -ListAvailable)) {
    Write-Warning -Message ('Az module not installed. Having both the AzureRM and ' +
      'Az modules installed at the same time is not supported.')
} else {
    Install-Module -Name Az -AllowClobber -Scope CurrentUser
}

途中、以下のようなダイアログで止まるので、「Y」か「A」を入力して、Enter。

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"):

エラーがなければ、インストール完了。

公式サイトはいろいろな情報が乗っているのですが、実際やることはこれだけです。

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?