Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
Install-Module -Name Az -AllowClobber
New-AzResourceGroup -Name "vignesh-test-ps" -Location 'East US'
New-AzVm -ResourceGroupName "vignesh-test-ps" -Name "ubuntu-test" -Image "UbuntuLTs" -Location "East US" -Size "Standard_B2s"
Remove-AzResourceGroup -Name "vignesh-test-ps"
az login
or
az login --user <myAlias@myCompany.com> -password <myPassword>
# get the current default subscription using show
az account show --output table
# get the current default subscription using list
az account list --query "[?isDefault]"
# change the active subscription using the subscription name
az account set --subscription "My Demos"
# change the active subscription using the subscription ID
az account set --subscription "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
az group create --name vignesh-test-cli --location eastus
az vm create \
--resource-group vignesh-test-cli \
--name windows-test \
--image Win2022AzureEditionCore \
--public-ip-sku Standard \
--admin-username azureuser
az vm delete \
--resource-group vignesh-test-cli \
--name windows-test \
--force-deletion none
az group delete --name vignesh-test-cli