Restart-AzHDInsightHost
重新啟動 HDInsight 叢集的特定主機。
語法
Restart-AzHDInsightHost
[[-ResourceGroupName] <String>]
[-ClusterName] <String>
[-Name] <String[]>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Restart-AzHDInsightHost
[[-ResourceGroupName] <String>]
[-ClusterName] <String>
[-AzureHDInsightHostInfo] <AzureHDInsightHostInfo[]>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
此 Restart-AzHDInsightHost Cmdlet 會重新啟動 HDInsight 叢集的特定主機。
範例
範例 1
# Cluster info
$clusterName = "your-hadoop-001"
Restart-AzHDInsightHost -ClusterName $clusterName -Name wn0, wn1
此命令會重新啟動叢集的兩部主機:worknode1、worknode2。
範例 2
# Cluster info
$clusterName = "your-hadoop-001"
$worknode1= Get-AzHDInsightHost -ClusterName $clusterName | Where-Object {$_.Name -like "wn1*"}
$worknode1 | Restart-AzHDInsightHost -ClusterName $clusterName
此命令示範如何配合 Cmdlet 'Get-AzHDInsightHost'。
參數
-AsJob
在背景執行 Cmdlet
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-AzureHDInsightHostInfo
取得或設定主機的名稱。
類型: | AzureHDInsightHostInfo[] |
別名: | Host |
Position: | 2 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-ClusterName
取得或設定叢集的名稱。
類型: | String |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Name
取得或設定主機的名稱。
類型: | String[] |
別名: | HostName |
Position: | 2 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-PassThru
{{ Fill PassThru Description }}
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
取得或設定資源群組的名稱。
類型: | String |
Position: | 0 |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
String[]