Azure CLI Samples for Windows virtual machines

The following table includes links to bash scripts built using the Azure CLI that deploy Windows virtual machines.

Create virtual machines
Create a virtual machine Creates a Windows virtual machine with minimal configuration.
Create a fully configured virtual machine Creates a resource group, virtual machine, and all related resources.
Create highly available virtual machines Creates several virtual machines in a highly available and load balanced configuration.
Create a VM and run configuration script Creates a virtual machine and uses the Azure Custom Script extension to install IIS.
Create a VM and run DSC configuration Creates a virtual machine and uses the Azure Desired State Configuration (DSC) extension to install IIS.
Manage storage
Create managed disk from a VHD Creates a managed disk from a specialized VHD as a OS disk or from a data VHD as data disk.
Create a managed disk from a snapshot Creates a managed disk from a snapshot.
Copy managed disk to same or different subscription Copies managed disk to same or different subscription but in the same region as the parent managed disk.
Export a snapshot as VHD to a storage account Exports a managed snapshot as VHD to a storage account in different region.
Export the VHD of a managed disk to a storage account Exports the underlying VHD of a managed disk to a storage account in different region.
Copy snapshot to same or different subscription Copies snapshot to same or different subscription but in the same region as the parent snapshot.
Network virtual machines
Secure network traffic between virtual machines Creates two virtual machines, all related resources, and an internal and external network security groups (NSG).
Secure virtual machines
Encrypt a VM and data disks Creates an Azure Key Vault, encryption key, and service principal, then encrypts a VM.
Monitor virtual machines
Monitor a VM with Azure Monitor Creates a virtual machine, installs the Log Analytics agent, and enrolls the VM in a Log Analytics workspace.