az vm
Manage Linux or Windows virtual machines. Azure CLI reference
48 commands 10 options Its page in the Azure CLI reference
Commands
aemManage Azure Enhanced Monitoring Extension for SAPapplicationManage applications for VMassess-patchesAssess patches on a VM.auto-shutdownManage auto-shutdown for VM.availability-setGroup resources into availability sets.boot-diagnosticsTroubleshoot the startup of an Azure Virtual Machine.captureCapture information for a stopped VM.convertConvert a VM with unmanaged disks to use managed disks.createCreate an Azure Virtual Machine.deallocateDeallocate a VM so that computing resources are no longer allocated (charges no longer apply).deleteDelete operation to delete a virtual machine.diagnosticsConfigure the Azure Virtual Machine diagnostics extension.diskManage the managed data disks attached to a VM.encryptionManage encryption of VM disks.extensionManage extensions on VMs.generalizeMark a VM as generalized, allowing it to be imaged for multiple deployments.get-instance-viewGet instance information about a VM.hostManage Dedicated Hosts for Virtual Machinesidentitymanage service identities of a VMimageInformation on available virtual machine images.install-patchesInstall patches on a VM.listList details of Virtual Machines.list-ip-addressesList IP addresses associated with a VM.list-sizesList available sizes for VMs.list-skusGet details for compute-related resource SKUs.list-usageList available usage resources for VMs.list-vm-resize-optionsList available resizing options for VMs.migrate-to-vmssMigrate a virtual machine from availability set to Flexible Virtual Machine Scale Set.monitorManage monitor aspect for a vm.nicManage network interfaces.open-portOpens a VM to inbound traffic on specified ports.perform-maintenanceThe operation to perform maintenance on a virtual machine.reapplyReapply VMs.redeployRedeploy an existing VM.reimageReimage (upgrade the operating system) a virtual machine.repairSetup repair VMs with copied source OS Disk to resolve issues.resizeUpdate a VM's size.restartRestart VMs.run-commandManage run commands on a Virtual Machine.secretManage VM secrets.showGet the details of a VM.simulate-evictionSimulate the eviction of a Spot VM.startStart a stopped VM.stopPower off (stop) a running VM.unmanaged-diskManage the unmanaged data disks attached to a VM.updateUpdate the properties of a VM.userManage user accounts for a VM.waitPlace the CLI in a waiting state until a condition is met.Options
--asgsSpace-separated list of existing application security groups to associate with the VM.--cachingDisk caching policy--name, --size, -n--no-auto-upgrade-minor-versionIf set, the extension service will not automatically pick or upgrade to the latest minor version, even if the extension is redeployed.--nsg-ruleNSG rule to create when creating a new NSG.--nsgThe name to use when creating a new Network Security Group (default) or referencing an existing one.--tagsspace-separated tags: key[=value] [key[=value] ...].--vm-nameThe name of the Virtual Machine.--workspaceName or ID of Log Analytics Workspace.--zone, -zAvailability zone into which to provision the resource.