az vm capture
Capture information for a stopped VM. Azure CLI reference
4 options Its page in the Azure CLI reference
Options
--name, -nThe name of the virtual machine.--overwriteOverwrite the existing disk file.--storage-containerThe storage account container name in which to save the disks.--vhd-name-prefixThe VHD name prefix specify for the VM disks.