Skip to content

hosomi/azure-cli-powershell-template

Repository files navigation

Azure CLI - Azure PowerShell

Azure CLI(AZ), Azure PowerShell AZ.

🔗 Azure CLI の概要 | Microsoft Docs
🔗 Azure PowerShell の概要 | Microsoft Docs
🔗 *1 非推奨 Azure PowerShell の概要 - AzureRM | Microsoft Docs

*1 非推奨 新しい Azure PowerShell Az モジュールの概要 | Microsoft Docs
* 🔗 マークは公式ドキュメントへのリンク、 マークが無いものは当リポジトリ内のリンクです。

Types

個人的によく使う一覧。
また、AzureRM(Azure PowerShell RM)から Azure CLI 及び、Azure PowerShell AZ に移行する参考にしてください。

Type Azure CLI Azure PowerShell(Az module) AzureRM (*1 非推奨)
Sign in az login Connect-AzAccount Login-AzureRmAccount
Manage Subscription az account AzSubscription, AzContext AzureRmSubscription, AzureRmContext
Resource Group az group AzResourceGroup AzureRmResourceGroup
Storage az storage account AzStorageAccount AzureRmStorageAccount
App Service Plan az appservice plan AzAppServicePlan AzureRmAppServicePlan
Web App az appservice AzWebApp, AzWebAppSlot AzureRmWebApp, AzureRmWebAppSlot
Functions az functionapp AzFunctionApp -
Cloud Services - - AzureDeployment

Content Matrix

引数は省略しています。

アカウント

Content Azure CLI Azure PowerShell(Az module) AzureRM (*1 非推奨)
サインイン az login Connect-AzAccount Login-AzureRmAccount
サブスクリプション一覧表示 az account list Get-AzSubscription Get-AzureRmSubscription
サブスクリプション設定 az account set Set-AzContext Set-AzureRmContext
リージョン一覧表示 az account list-locations

リソースグループ

Content Azure CLI Azure PowerShell(Az module) AzureRM (*1 非推奨)
一覧表示 az group list Get-AzResourceGroup Get-AzureRmResourceGroup
作成 az group create New-AzResourceGroup New-AzureRmResourceGroup
削除 az group delete Remove-AzResourceGroup Remove-AzureRmResource

ストレージアカウント

Content Azure CLI Azure PowerShell(Az module) AzureRM (*1 非推奨)
一覧表示 az storage account list Get-AzStorageAccount Get-AzureRmStorageAccount
詳細表示 az storage account show Get-AzStorageAccount Get-AzureRmStorageAccount
作成 az storage account create New-AzStorageAccount New-AzureRmStorageAccount
削除 az storage account delete Remove-AzStorageAccount Remove-AzureRmStorageAccount

App Service プラン

Content Azure CLI Azure PowerShell(Az module) AzureRM (*1 非推奨)
詳細表示 az appservice plan show Get-AzAppServicePlan Get-AzureRmAppServicePlan
作成 az appservice plan create New-AzAppServicePlan New-AzureRmAppServicePlan
更新 az appservice plan update Set-AzAppServicePlan Set-AzureRmAppServicePlan
削除 az appservice plan delete Remove-AzAppServicePlan Remove-AzureRmAppServicePlan

Web App

Content Azure CLI Azure PowerShell(Az module) AzureRM (*1 非推奨)
詳細表示 az webapp show Get-AzWebApp Get-AzureRmWebApp
作成 az webapp create New-AzWebApp New-AzureRmWebApp
開始 az webapp start Start-AzWebApp Start-AzureRmWebApp
停止 az webapp stop Stop-AzWebApp Stop-AzureRmWebApp
再起動 az webapp restart Restart-AzWebApp Restart-AzureRmWebApp
スロット一覧表示 az webapp deployment slot list Get-AzWebAppSlot Get-AzureRmWebAppSlot
スロット作成 az webapp deployment slot create New-AzWebAppSlot New-AzureRmWebAppSlot
スロットスワップ az webapp deployment slot swap Switch-AzWebAppSlot Switch-AzureRmWebAppSlot
スロット開始 az webapp start --slot Start-AzWebAppSlot Start-AzureRmWebAppSlot
スロット停止 az webapp stop --slot Stop-AzWebAppSlot Stop-AzureRmWebAppSlot
スロット再起動 az webapp restart --slot Restart-AzWebAppSlot Restart-AzureRmWebAppSlot
アプリケーション設定一覧表示 az webapp config appsettings list Get-AzWebApp Get-AzureRmWebApp
アプリケーション設定 az webapp config appsettings set Set-AzWebApp Set-AzureRmWebApp
アプリケーション設定削除 az webapp config appsettings delete Set-AzWebApp Set-AzureRmWebApp
接続文字列一覧表示 az webapp config connection-string list Get-AzWebApp Get-AzureRmWebApp
接続文字列設定 az webapp config connection-string set Set-AzWebApp Set-AzureRmWebApp
接続文字列設定削除 az webapp config connection-string delete Set-AzWebApp Set-AzureRmWebApp

Functions

AzureRM (*1 非推奨) から操作はできません。
接続文字列は webapp と同じモジュールで操作を行います。

Content Azure CLI Azure PowerShell(Az module)
詳細表示 az functionapp show Get-AzFunctionApp
作成 az functionapp create New-AzFunctionApp
開始 az functionapp start Start-AzFunctionApp
停止 az functionapp stop Stop-AzFunctionApp
再起動 az functionapp restart Restart-AzFunctionApp
スロット一覧表示 az functionapp deployment slot list
スロット作成 az functionapp deployment slot create
スロットスワップ az functionapp deployment slot swap
アプリケーション設定一覧表示 az functionapp config appsettings list
アプリケーション設定 az functionapp config appsettings set
アプリケーション設定削除 az functionapp config appsettings delete

 
 
 
 
 
 


©️ 商標について

当ドキュメントに記載されている会社名、システム名、製品名は一般に各社の登録商標または商標です。
なお、本文および図表中では、「™」、「®」は明記しておりません。

免責事項

当ドキュメント上の掲載内容については細心の注意を払っていますが、その情報に関する信頼性、正確性、完全性について保証するものではありません。
掲載された内容の誤り、および掲載された情報に基づいて行われたことによって生じた直接的、また間接的トラブル、損失、損害については、筆者は一切の責任を負いません。
また当ドキュメント、およびドキュメントに含まれる情報、コンテンツは、通知なしに随時変更されます。