Modifier

Partager via


Restart-AzHDInsightHost

Restarts the specific hosts of HDInsight cluster.

Syntax

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

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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AzureHDInsightHostInfo

Gets or sets the name of the host.

Type:AzureHDInsightHostInfo[]
Aliases:Host
Position:2
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ClusterName

Gets or sets the name of the cluster.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Gets or sets the name of the host.

Type:String[]
Aliases:HostName
Position:2
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-PassThru

{{ Fill PassThru Description }}

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Gets or sets the name of the resource group.

Type:String
Position:0
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String[]

AzureHDInsightHostInfo[]

Outputs

Boolean