Restart-AzHDInsightHost
Restarts the specific hosts of HDInsight cluster.
Syntax
SetByNameParameterSet (Default)
Restart-AzHDInsightHost
[[-ResourceGroupName] <String>]
[-ClusterName] <String>
[-Name] <String[]>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByAzureHDInsightHostInfoParameterSet
Restart-AzHDInsightHost
[[-ResourceGroupName] <String>]
[-ClusterName] <String>
[-AzureHDInsightHostInfo] <AzureHDInsightHostInfo[]>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
This Restart-AzHDInsightHost cmdlet restart the specific hosts of HDInsight cluster.
Examples
Example 1
# Cluster info
$clusterName = "your-hadoop-001"
Restart-AzHDInsightHost -ClusterName $clusterName -Name wn0, wn1
This command restarts two hosts of the cluster: worknode1, worknode2.
Example 2
# Cluster info
$clusterName = "your-hadoop-001"
$worknode1= Get-AzHDInsightHost -ClusterName $clusterName | Where-Object {$_.Name -like "wn1*"}
$worknode1 | Restart-AzHDInsightHost -ClusterName $clusterName
This command shows how to cooperate with the cmdlet 'Get-AzHDInsightHost'.
Parameters
-AsJob
Run cmdlet in the background
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AzureHDInsightHostInfo
Gets or sets the name of the host.
Parameter properties
Parameter sets
SetByAzureHDInsightHostInfoParameterSet
Position: 2
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-ClusterName
Gets or sets the name of the cluster.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
Gets or sets the name of the host.
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Aliases: HostName
Parameter sets
SetByNameParameterSet
Position: 2
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-PassThru
{{ Fill PassThru Description }}
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
Gets or sets the name of the resource group.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 0
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs