Azure PowerShell – Container Instance Cmdlets
Synopsis
This reference provides detailed information about the Azure PowerShell cmdlets used to manage Azure Container Instances (ACI). Use these cmdlets to create, configure, and manage containers in Azure without configuring complex orchestration services.
Available Cmdlets
| Cmdlet | Purpose | 
|---|---|
| New-AzContainerGroup | Create a new container group. | 
| Get-AzContainerGroup | Retrieve details of a container group. | 
| Stop-AzContainerGroup | Stop a running container group. | 
| Remove-AzContainerGroup | Delete a container group. | 
| Update-AzContainerGroup | Update configuration of an existing container group. | 
| Invoke-AzContainerGroupLog | Stream logs from a container group. | 
Example: Deploy a Simple Nginx Container
# Install Azure PowerShell if not already installed
Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force
# Connect to your Azure account
Connect-AzAccount
# Select subscription (optional)
Select-AzSubscription -SubscriptionId "YOUR_SUBSCRIPTION_ID"
# Create a resource group
New-AzResourceGroup -Name "MyContainerRG" -Location "EastUS"
# Deploy an Nginx container group
New-AzContainerGroup -ResourceGroupName "MyContainerRG" `
    -Name "nginx-group" `
    -Location "EastUS" `
    -Image "nginx:latest" `
    -OsType Linux `
    -DnsNameLabel "my-nginx-demo" `
    -IpAddressType Public `
    -Port 80
# Verify deployment
Get-AzContainerGroup -ResourceGroupName "MyContainerRG" -Name "nginx-group"
Parameters Overview
| Parameter | Type | Description | 
|---|---|---|
| -ResourceGroupName | String | Name of the resource group. | 
| -Name | String | Container group name. | 
| -Location | String | Azure region. | 
| -Image | String | Docker image (e.g., nginx:latest). | 
| -OsType | String | OS type: LinuxorWindows. | 
| -DnsNameLabel | String | Label for the public FQDN. | 
| -IpAddressType | String | PublicorPrivate. | 
| -Port | Int | Port to expose. |