< Back

Restart-AzureRmVmss

Tue Jan 29, 2019 9:39 pm

NAME Restart-AzureRmVmss



SYNOPSIS

Restarts the VMSS or a virtual machine within the VMSS.





SYNTAX

Restart-AzureRmVmss [-ResourceGroupName] <String> [-VMScaleSetName] <String> [[-InstanceId] <String[]>] [-AsJob] [-DefaultProfile

<IAzureContextContainer>] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Restart-AzureRmVmss cmdlet restarts the Virtual Machine Scale Set (VMSS). This cmdlet can also be used to restart a specific virtual machine

inside the VMSS by using the InstanceId parameter.





PARAMETERS

-AsJob [<SwitchParameter>]

Run cmdlet in the background and return a Job to track progress.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InstanceId <String[]>

Specifies, as a string array, the ID of the instances that need restarted.



Required? false

Position? 3

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the name of the resource group of the VMSS.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-VMScaleSetName <String>

Species the name of the VMSS that this cmdlet restarts.



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS



This cmdlet does not generate any output.





NOTES









Example 1: Restart the VMSS



PS C:\\> Restart-AzureRmVmss -ResourceGroupName "Group001" -VMScaleSetName "VMSS001";



This command restarts the VMSS named VMSS001 that belongs to the resource group named Group001.





Example 2: Restart a specific virtual machine within the VMSS



PS C:\\> Restart-AzureRmVmss -ResourceGroupName "Group004" -VMScaleSetName "VMSS001" -InstanceId "1"



This command restarts a virtual machine that has the instance ID of 1 in the VMSS named VMSS001 that belongs to the resource group named Group001.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... zurermvmss

Get-AzureRmVmssDiskEncryption

New-AzureRmVmss

Remove-AzureRmVmss

Set-AzureRmVmss

Restart-AzureRmVmss

Stop-AzureRmVmss

Update-AzureRmVmss