az-test-vm-script-quickguide

VM

Azure “good-to-know” about any VM, with example on SKU:General purpose virtual machine sizes:

https://docs.microsoft.com/en-us/azure/virtual-machines/sizes-general

Checking VM stats on the Dv2 and DSv2-series:

Size and vCPU
Memory GiB
Temp storage (SSD) GiB
Max temp storage throughput: IOPS/Read MBps/Write MBps
Max data disks
Throughput: IOPS
Max NICs
Expected network bandwidth

https://docs.microsoft.com/en-us/azure/virtual-machines/dv2-dsv2-series

Good SKU for testing:

Rgaz104-07-rg0
Virtual macine nameaz104testVM
RegionWest Europe
Availability opt.Availability zone, 1
ImageWindows Server 2016 Datacenter -Gen2
SizeB2s General purpose, 2 vcpu, 4 gib memory
UserThe7481Announcementin85February2008That783LedZeppelinWouldTakeThe
StageAtThe87Bonnaroo78Festival01
PanteraIsRegardedAsOneOfTheMost8745Successful08And98Influential741254
BandsInHeavy666MetalHistoryHaving75SoldAround20MillionRecords
WorldWide18AndHavingReceived481FourGrammyNominations168,
[and the numbers/letters/signs for Caesar Cipher or not!? Who knows, Twitter does]
Public inbound portAllow selected
Select inbound portRDP, 3389
DiskStandard SSD, lrs
NetworkCreate all new and keep default or use existing
ManagementKeep default
AdvancedKeep default
Tags
Review + create
PricePrice, 0.0769 AUD/hr

#Remove all
Get-AzResourceGroup -Name ‘az104-07*’ | Remove-AzResourceGroup -Force -AsJob


MS Azure

Azure documentation

https://docs.microsoft.com/en-us/azure/?produ

Connect to Azure using Powershell (Module -Name Az must be installed)

# $PSVersionTable.PSVersion
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force
# Take a coffee, this takes time, answer Yx2 and wait, when done, close/open Powershell and verify module
# Minimum Powershell v is 5.1
# Get-InstalledModule -Name Az

Connect-AzAccount
# or
Connect-AzAccount -TenantId The-tenant-id-we-copied-from-azure-ad
$rg = “testit2-rg”
Get-AzResource -ResourceGroupName $rg

AZ Powershell Reference

https://docs.microsoft.com/en-us/powershell/azure/?view=azps-6.3.0&viewFallbackFrom=azps-5.2.0

Connect to Azure from Az CLI (must be installed) using Git Bash (must be installed) :

az login
# If that does not work, go to Portal.azure.com, Azure Active Directory, Properties and you will see the tenant id, cp it
az login –tenant The-tenant-id-we-copied-from-azure-ad
rg=”testit2-rg”
az resource list –resource-group $rg

AZ CLI Reference

https://docs.microsoft.com/en-us/cli/azure/