Az.Compute PowerShell Module

GitHub

Overview

The Az.Compute module provides cmdlets for managing Azure compute resources such as virtual machines, VM scale sets, images, disks, and more. It is part of the larger Az PowerShell ecosystem.

Key Features

Installation

Run the following PowerShell command to install the module from the PowerShell Gallery:

Install-Module -Name Az.Compute -Repository PSGallery -Force

To update the module later:

Update-Module -Name Az.Compute

Getting Started

Import the module and sign in to your Azure account:

Import-Module Az.Compute
Connect-AzAccount

Example: Create a simple Windows VM:

New-AzVM `
    -ResourceGroupName "MyResourceGroup" `
    -Name "MyWinVM" `
    -Location "EastUS" `
    -VirtualNetworkName "MyVnet" `
    -SubnetName "MySubnet" `
    -SecurityGroupName "MyNSG" `
    -PublicIpAddressName "MyPublicIP" `
    -Image "Win2019Datacenter" `
    -Size "Standard_DS2_v2"

Documentation & Resources