Azure クラウド サービス (延長サポート) をリセットする

ここに挙げたサンプルでは、Azure クラウド サービス (延長サポート) の既存のデプロイをリセットする際のさまざまな方法を紹介します。

クラウド サービスのロール インスタンスを再イメージ化する

$roleInstances = @("ContosoFrontEnd_IN_0", "ContosoBackEnd_IN_1")
Invoke-AzCloudServiceReimage -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstance $roleInstances

このコマンドは、ContosOrg というリソース グループに所属する ContosoCS というクラウド サービスの 2 つのロール インスタンス (ContosoFrontEnd_IN_0 と ContosoBackEnd_IN_1) を再イメージ化するものです。

クラウド サービスのロールをすべて再イメージ化する

Invoke-AzCloudServiceReimage -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstance "*"

このコマンドは、ContosOrg というリソース グループに所属する ContosoCS というクラウド サービスのすべてのロール インスタンスを再イメージ化するものです。

クラウド サービスの単一のロール インスタンスを再イメージ化する

Invoke-AzCloudServiceRoleInstanceReimage -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstanceName "ContosoFrontEnd_IN_0"

このコマンドは、ContosOrg というリソース グループに所属する ContosoCS というクラウド サービスの ContosoFrontEnd_IN_0 というロール インスタンスを再イメージ化するものです。

クラウド サービスのロール インスタンスをリビルドする

$roleInstances = @("ContosoFrontEnd_IN_0", "ContosoBackEnd_IN_1")
Invoke-AzCloudServiceRebuild -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstance $roleInstances

このコマンドは、ContosOrg というリソース グループに所属する ContosoCS というクラウド サービスの 2 つのロール インスタンス (ContosoFrontEnd_IN_0 と ContosoBackEnd_IN_1) をリビルドするものです。

クラウド サービスのロールをすべてリビルドする

Invoke-AzCloudServiceRebuild -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstance "*"

このコマンドは、ContosOrg というリソース グループに所属する ContosoCS というクラウド サービスのすべてのロール インスタンスをリビルドするものです。

クラウド サービスのロール インスタンスを再起動する

$roleInstances = @("ContosoFrontEnd_IN_0", "ContosoBackEnd_IN_1")
Restart-AzCloudService -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstance $roleInstances

このコマンドは、ContosOrg というリソース グループに所属する ContosoCS というクラウド サービスの 2 つのロール インスタンス (ContosoFrontEnd_IN_0 と ContosoBackEnd_IN_1) を再起動するものです。

クラウド サービスのロールをすべて再起動する

Restart-AzCloudService -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstance "*"

このコマンドは、ContosOrg というリソース グループに所属する ContosoCS というクラウド サービスのすべてのロール インスタンスを再起動するものです。

次のステップ