Using Azure from Visual Studio Code Part 3 – Set context and change appearance

As a bonus we will add a specfic subscription so we don’t have to define it in every command and change the layout of VSCode.

You can choose how you like to view your terminal. Go to view, appearance and toggle panel position for a vertical view.

Now let’s se the context to default a subscription.

Get the subscription id by below command.


Add your subscription to a variabel by getting it from the get-command

$SubscriptionID = Get-AzureRMSubscription | Where-Object
Name -like '*minsubscription*'

Now you have your subscription in a variable and you can define it’s context by below command.

Set-AzureRmContext -SubscriptionID $SubscriptionID

There we go! Now start to use Azure from Visual Studio Code!

Using Azure from Visual Studio Code Part 2 – Download Azure Account extension

After Visual Studio Code is installed press the following command on your keyboard.


Next write

install extensions

Search in Markeplace for Azure Account and press install.

After Aure Account is installed press ctrl+shit+p again and type

Azure:sign in

Wait for the browser to open and display that you’re logged in.

Once signed in press the same command again and type

Azure:open PowerShell in Cloud Shell

You can also use the same command to open bash.

A terminal will open up and now you’re signed in with your account!

Congrats! You can now use AZ from your own computer!