Remove-AzVmssVm
Removes a virtual machine scale set (VMSS) virtual machine.
SYNOPSIS
Remove-AzVmssVm [-VirtualMachineScaleSetVMId] <String> [-Force] [-AsJob] [-WhatIf] [-Confirm]
DESCRIPTION
The Remove-AzVmssVm cmdlet removes a virtual machine scale set (VMSS) virtual machine.
Parameters
Syntax
Remote Management
Related Links
Parameters
| Name | Description |
|---|---|
-VirtualMachineScaleSetVMId [Required] |
Specifies the ID of the VMSS virtual machine to remove. |
-Force |
Prompts you for confirmation unless this parameter is specified. |
-AsJob |
Runs the cmdlet as a background job. |
-WhatIf |
Shows what would happen if the cmdlet runs. The cmdlet is not run. |
-Confirm |
Prompts you for confirmation before running the cmdlet. |
Syntax
Remove-AzVmssVm [-VirtualMachineScaleSetVMId] <String> [-Force] [-AsJob] [-WhatIf] [-Confirm]
Detailed Syntax
Remove-AzVmssVm -VirtualMachineScaleSetVMId <String> [-Force] [-AsJob] [-WhatIf] [-Confirm]
Remote Management
This cmdlet does not support remote management.
EXAMPLES
Example 1: Remove a VMSS VM
This command removes the VMSS VM with the specified ID.
Remove-AzVmssVm -VirtualMachineScaleSetVMId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss/virtualMachines/instance1"
Example 2: Remove a VMSS VM without confirmation
This command removes the VMSS VM with the specified ID without prompting for confirmation.
Remove-AzVmssVm -VirtualMachineScaleSetVMId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss/virtualMachines/instance2" -Force