Convert-AzVmssVm

The Convert-AzVmssVm cmdlet converts a Virtual Machine Scale Set (VMSS) instance to a standalone virtual machine.

SYNOPSIS

Converts a VMSS instance to a standalone virtual machine.

SYNTAX

Convert-AzVmssVm -ResourceGroupName <String>
    -VMScaleSetName <String>
    -InstanceId <String>
    [-SubscriptionId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]

DESCRIPTION

This cmdlet detaches a specific instance from a Virtual Machine Scale Set and converts it into an independent, standalone virtual machine. The original VMSS remains unaffected, and the converted VM will have its own lifecycle and management independent of the scale set.

PARAMETERS

Name Type Description Required?
-ResourceGroupName String The name of the resource group that contains the Virtual Machine Scale Set. Yes
-VMScaleSetName String The name of the Virtual Machine Scale Set. Yes
-InstanceId String The instance ID of the VMSS instance to convert. Yes
-SubscriptionId String The ID of the subscription to use. If not specified, the current subscription is used. No
-DefaultProfile IAzureContextContainer The Azure context to use for this cmdlet. No
-WhatIf Switch Shows what would happen if the cmdlet runs. The cmdlet is not run. No
-Confirm Switch Prompts you for confirmation before running the cmdlet. No

ALIASES

Note: After conversion, the VMSS instance will no longer be part of the scale set. Any future scaling operations or updates to the VMSS configuration will not affect the converted virtual machine.

EXAMPLES

Example 1: Convert a VMSS instance to a standalone VM

This example converts the VMSS instance with ID '1' from the VMSS named 'myVmss' in the resource group 'myResourceGroup' to a standalone virtual machine.

Convert-AzVmssVm -ResourceGroupName "myResourceGroup" -VMScaleSetName "myVmss" -InstanceId "1"

Example 2: Convert and prompt for confirmation

This example converts the VMSS instance with ID '3' from 'prodVmss' in 'prodResourceGroup' and prompts the user for confirmation before proceeding.

Convert-AzVmssVm -ResourceGroupName "prodResourceGroup" -VMScaleSetName "prodVmss" -InstanceId "3" -Confirm

INPUTS

None. You can pipe objects to this cmdlet.

OUTPUTS

Microsoft.Azure.Commands.Compute.Models.PSVirtualMachine

The cmdlet returns a PSVirtualMachine object representing the newly created standalone virtual machine.

RELATED LINKS

Get-AzVmssVm
Update-AzVmssVm
Get-AzVmss