< Back
Stop-AzureRmVmss
Post
NAME Stop-AzureRmVmss
SYNOPSIS
Stops the VMSS or a set of virtual machines within the VMSS.
SYNTAX
Stop-AzureRmVmss [-ResourceGroupName] <String> [-VMScaleSetName] <String> [[-InstanceId] <String[]>] [-AsJob] [-DefaultProfile
<IAzureContextContainer>] [-Force] -StayProvisioned [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Stop-AzureRmVmss cmdlet stops all the virtual machines within the Virtual Machine Scale Set (VMSS) or a set of virtual machines. You can use
the InstanceId parameter to select a set of virtual machines.
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
-Force [<SwitchParameter>]
Forces the command to run without asking for user confirmation.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-InstanceId <String[]>
Specifies, as a string array, the ID or IDs of the virtual machine instances that this cmdlet stops. For instance: `-InstanceId "0", "3"`.
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
-StayProvisioned [<SwitchParameter>]
If specified, the virtual machine will enter stopped state. If not specified, the virtual machine will enter stopped-deallocated state. The
user is still charged for VMs in stopped state but not for VMs in stopped-deallocated state.
Required? true
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-VMScaleSetName <String>
Specifies the name of the VMSS for which this cmdlet stops the virtual machines.
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
Microsoft.Azure.Commands.Compute.Automation.Models.PSOperationStatusResponse
NOTES
Example 1: Stop all the virtual machines within the VMSS
PS C:\\> Stop-AzureRmVmss -ResourceGroupName "ContosoGroup" -VMScaleSetName "ContosoVMSS"
This command stops all virtual machines that belong to the VMSS named ContosoVMSS.
Example 2: Stop a specific set of virtual machines within the VMSS
PS C:\\> Stop-AzureRmVmss -ResourceGroupName "ContosoGroup" -VMScaleSetName "ContosoVMSS" -InstanceId "3","5"
This command stops a specific set of virtual machines specified by the instance ID string array that belong to the VMSS named ContosoVMSS.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... zurermvmss
Get-AzureRmVmssDiskEncryption
New-AzureRmVmss
Remove-AzureRmVmss
Restart-AzureRmVmss
Set-AzureRmVmss
Restart-AzureRmVmss
Update-AzureRmVmss
SYNOPSIS
Stops the VMSS or a set of virtual machines within the VMSS.
SYNTAX
Stop-AzureRmVmss [-ResourceGroupName] <String> [-VMScaleSetName] <String> [[-InstanceId] <String[]>] [-AsJob] [-DefaultProfile
<IAzureContextContainer>] [-Force] -StayProvisioned [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Stop-AzureRmVmss cmdlet stops all the virtual machines within the Virtual Machine Scale Set (VMSS) or a set of virtual machines. You can use
the InstanceId parameter to select a set of virtual machines.
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
-Force [<SwitchParameter>]
Forces the command to run without asking for user confirmation.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-InstanceId <String[]>
Specifies, as a string array, the ID or IDs of the virtual machine instances that this cmdlet stops. For instance: `-InstanceId "0", "3"`.
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
-StayProvisioned [<SwitchParameter>]
If specified, the virtual machine will enter stopped state. If not specified, the virtual machine will enter stopped-deallocated state. The
user is still charged for VMs in stopped state but not for VMs in stopped-deallocated state.
Required? true
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-VMScaleSetName <String>
Specifies the name of the VMSS for which this cmdlet stops the virtual machines.
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
Microsoft.Azure.Commands.Compute.Automation.Models.PSOperationStatusResponse
NOTES
Example 1: Stop all the virtual machines within the VMSS
PS C:\\> Stop-AzureRmVmss -ResourceGroupName "ContosoGroup" -VMScaleSetName "ContosoVMSS"
This command stops all virtual machines that belong to the VMSS named ContosoVMSS.
Example 2: Stop a specific set of virtual machines within the VMSS
PS C:\\> Stop-AzureRmVmss -ResourceGroupName "ContosoGroup" -VMScaleSetName "ContosoVMSS" -InstanceId "3","5"
This command stops a specific set of virtual machines specified by the instance ID string array that belong to the VMSS named ContosoVMSS.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... zurermvmss
Get-AzureRmVmssDiskEncryption
New-AzureRmVmss
Remove-AzureRmVmss
Restart-AzureRmVmss
Set-AzureRmVmss
Restart-AzureRmVmss
Update-AzureRmVmss