Restart-AzureVM

Azure 仮想マシンを再起動します。

Note

このドキュメントで参照されているコマンドレットは、Azure Service Manager (ASM) API を使用する従来の Azure リソースを管理するためのものです。 ASM の提供終了が予定されているため、新しいリソースを作成する場合、このレガシ PowerShell モジュールは推奨されません。 詳細については、Azure Service Manager の提供終了に関するページを参照してください

Az PowerShell モジュールは、PowerShell を使用して Azure Resource Manager (ARM) リソースを管理するために推奨される PowerShell モジュールです。

構文

Restart-AzureVM
       [-Name] <String>
       [-ServiceName] <String>
       [-Profile <AzureSMProfile>]
       [-InformationAction <ActionPreference>]
       [-InformationVariable <String>]
       [<CommonParameters>]
Restart-AzureVM
       [-Name] <String>
       [-Redeploy]
       [-ServiceName] <String>
       [-Profile <AzureSMProfile>]
       [-InformationAction <ActionPreference>]
       [-InformationVariable <String>]
       [<CommonParameters>]
Restart-AzureVM
       [-Name] <String>
       [-InitiateMaintenance]
       [-ServiceName] <String>
       [-Profile <AzureSMProfile>]
       [-InformationAction <ActionPreference>]
       [-InformationVariable <String>]
       [<CommonParameters>]
Restart-AzureVM
       -VM <PersistentVM>
       [-ServiceName] <String>
       [-Profile <AzureSMProfile>]
       [-InformationAction <ActionPreference>]
       [-InformationVariable <String>]
       [<CommonParameters>]
Restart-AzureVM
       -VM <PersistentVM>
       [-Redeploy]
       [-ServiceName] <String>
       [-Profile <AzureSMProfile>]
       [-InformationAction <ActionPreference>]
       [-InformationVariable <String>]
       [<CommonParameters>]
Restart-AzureVM
       -VM <PersistentVM>
       [-InitiateMaintenance]
       [-ServiceName] <String>
       [-Profile <AzureSMProfile>]
       [-InformationAction <ActionPreference>]
       [-InformationVariable <String>]
       [<CommonParameters>]

説明

Restart-AzureVM コマンドレットは、Azure 仮想マシンの再起動を要求します。

例 1: 仮想マシンを再起動する

PS C:\> Restart-AzureVM -ServiceName "MyService01" -Name "MyVM"

このコマンドは、Service01 という名前の Azure サービスで実行されている VirtualMachine27 仮想マシンを再起動します。

例 2: 仮想マシン オブジェクトを使用して仮想マシンを再起動する

PS C:\> Get-AzureVM -ServiceName "MyService01" -Name "VirtualMachine27" | Restart-AzureVM

このコマンドは、MyVM という名前の仮想マシンの仮想マシン オブジェクトを取得し、再起動します。

パラメーター

-InformationAction

このコマンドレットが情報イベントに応答する方法を指定します。

このパラメーターの有効値は、次のとおりです。

  • 続行
  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • [中断]
型:ActionPreference
Aliases:infa
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-InformationVariable

情報変数を指定します。

型:String
Aliases:iv
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-InitiateMaintenance

仮想マシンのメンテナンスを開始する

型:SwitchParameter
配置:Named
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-Name

再起動する仮想マシンの名前を指定します。

型:String
配置:1
規定値:None
必須:True
パイプライン入力を受け取る:True
ワイルドカード文字を受け取る:False

-Profile

このコマンドレットが読み取る Azure プロファイルを指定します。 プロファイルを指定しない場合、このコマンドレットはローカルの既定のプロファイルから読み取ります。

型:AzureSMProfile
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-Redeploy

コマンドレットが仮想マシンを再デプロイすることを示します。

型:SwitchParameter
配置:Named
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-ServiceName

再起動する仮想マシンを含む Azure サービスの名前を指定します。

型:String
配置:0
規定値:None
必須:True
パイプライン入力を受け取る:True
ワイルドカード文字を受け取る:False

-VM

再起動する仮想マシンを識別する仮想マシン オブジェクトを指定します。

型:PersistentVM
Aliases:InputObject
配置:Named
規定値:None
必須:True
パイプライン入力を受け取る:True
ワイルドカード文字を受け取る:False