Use the Restart-AzVmssVm cmdlet to restart a specific virtual machine scale set (VMSS) instance.
Restart-AzVmssVm -ResourceGroupName "" -VMScaleSetName "" -InstanceId "" [-Force] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] []    
        The Restart-AzVmssVm cmdlet restarts a virtual machine in a virtual machine scale set (VMSS).
This command allows you to reboot individual instances within your VMSS, which can be useful for applying updates, troubleshooting, or recovering from issues without affecting the entire scale set.
Get-AzVmssVm.This example restarts the VMSS instance with Instance ID '3' in the 'MyResourceGroup' resource group and 'MyVmss' scale set.
Restart-AzVmssVm -ResourceGroupName "MyResourceGroup" -VMScaleSetName "MyVmss" -InstanceId "3"
                This example forcefully restarts the VMSS instance '1' in 'ProductionResourceGroup' without user confirmation.
Restart-AzVmssVm -ResourceGroupName "ProductionResourceGroup" -VMScaleSetName "WebAppScaleSet" -InstanceId "1" -Force
                This example restarts the VMSS instance '0' and allows you to continue working in PowerShell.
Restart-AzVmssVm -ResourceGroupName "DevResourceGroup" -VMScaleSetName "TestScaleSet" -InstanceId "0" -AsJob
                To restart a VMSS VM, you need to provide the resource group name, the VMSS name, and the specific instance ID of the VM you wish to restart.
You can obtain the instance ID using the Get-AzVmssVm cmdlet. For example:
Get-AzVmssVm -ResourceGroupName "MyResourceGroup" -VMScaleSetName "MyVmss" | Select-Object -ExpandProperty InstanceId
            Once you have the instance ID, you can pipe it or pass it directly to Restart-AzVmssVm.
-Force parameter with caution.
            Fill out the form below to simulate running the Restart-AzVmssVm command.