Stop-AzVM

This cmdlet stops an Azure virtual machine. You can stop the VM and release its compute resources, or you can deallocate it to also release the associated IP addresses and avoid ongoing charges for compute.

Syntax
Stop-AzVM
    [-Force]
    [-AsJob]
    [-WhatIf]
    [-Confirm]
    []
Parameters
Examples
# Stop a virtual machine
Stop-AzVM -Name "MyVM" -ResourceGroupName "MyResourceGroup"

# Stop and deallocate a virtual machine
Stop-AzVM -Name "MyVM" -ResourceGroupName "MyResourceGroup" -Deallocate

# Stop a virtual machine without confirmation
Stop-AzVM -Name "MyVM" -ResourceGroupName "MyResourceGroup" -Force