< Back
Remove-AzureRmVmss
Post
NAME Remove-AzureRmVmss
SYNOPSIS
Removes the VMSS or a virtual machine that is within the VMSS.
SYNTAX
Remove-AzureRmVmss [-ResourceGroupName] <String> [-VMScaleSetName] <String> [[-InstanceId] <String[]>] [-AsJob] [-DefaultProfile
<IAzureContextContainer>] [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Remove-AzureRmVmss cmdlet removes the Virtual Machine Scale Set (VMSS) from Azure. This cmdlet can also be used to remove a specific virtual
machine inside the VMSS. You can use the InstanceId parameter to remove a specific virtual machine inside the VMSS.
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 of the instances that need to be started. 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 that the VMSS belongs to.
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 removes. If you specify the InstanceId parameter, the cmdlet will remove the specified virtual
machine from the VMSS named by this parameter.
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: Remove a VMSS
PS C:\\> Remove-AzureRmVmss -ResourceGroupName "Group001" -VMScaleSetName "VMScaleSet001"
This command removes the VMSS named VMScaleSet001 that belongs to the resource group named Group001.
Example 2: Remove a virtual machine from within a VMSS
PS C:\\> Remove-AzureRmVmss -ResourceGroupName "Group002" -VMScaleSetName "VMScaleSet002" -InstanceId "3";
This command removes the virtual machine with instance ID 3 from the VMSS named VMScaleSet002 that belongs to the resource group named Group002.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... zurermvmss
Get-AzureRmVmssDiskEncryption
New-AzureRmVmss
Restart-AzureRmVmss
Set-AzureRmVmss
Restart-AzureRmVmss
Stop-AzureRmVmss
Update-AzureRmVmss
SYNOPSIS
Removes the VMSS or a virtual machine that is within the VMSS.
SYNTAX
Remove-AzureRmVmss [-ResourceGroupName] <String> [-VMScaleSetName] <String> [[-InstanceId] <String[]>] [-AsJob] [-DefaultProfile
<IAzureContextContainer>] [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Remove-AzureRmVmss cmdlet removes the Virtual Machine Scale Set (VMSS) from Azure. This cmdlet can also be used to remove a specific virtual
machine inside the VMSS. You can use the InstanceId parameter to remove a specific virtual machine inside the VMSS.
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 of the instances that need to be started. 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 that the VMSS belongs to.
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 removes. If you specify the InstanceId parameter, the cmdlet will remove the specified virtual
machine from the VMSS named by this parameter.
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: Remove a VMSS
PS C:\\> Remove-AzureRmVmss -ResourceGroupName "Group001" -VMScaleSetName "VMScaleSet001"
This command removes the VMSS named VMScaleSet001 that belongs to the resource group named Group001.
Example 2: Remove a virtual machine from within a VMSS
PS C:\\> Remove-AzureRmVmss -ResourceGroupName "Group002" -VMScaleSetName "VMScaleSet002" -InstanceId "3";
This command removes the virtual machine with instance ID 3 from the VMSS named VMScaleSet002 that belongs to the resource group named Group002.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... zurermvmss
Get-AzureRmVmssDiskEncryption
New-AzureRmVmss
Restart-AzureRmVmss
Set-AzureRmVmss
Restart-AzureRmVmss
Stop-AzureRmVmss
Update-AzureRmVmss