azure-az104-flashcards

Powershell

Basic commands

$ pwsh
$ PS> Connect-AzAccount

Browsing commands

$ PS> Get-Command -Verb Get -Noun AzVM* 

Type of commands

Examples

Move-AzResource

Moves a resource to a different resource group or subscription.

$ PS> $Resource = Get-AzStorageAccount -ResourceGroupName "az-104" -Name "egchsa2"
$ PS> Move-AzResource -ResourceId $Resource.Id -DestinationResourceGroupName "arm-grp"

Create a new Resource Group

$ PS> New-AzResourceGroup -Name RG01 -Location "South Central US"

Poweshell on Visual Studio Code

Install the extensions:

Scripts

Other Powershell scripts can he found here