Following on from my last post regarding deploying PowerShell Core on Ubuntu 16.04 and then importing Azure PowerShell Module to build and manage your Azure Resources, this post shows the steps involved in connecting to your Azure Tenant and deploying an Ubuntu Instance on Azure.

How do we get there?

  1. From the screenshot below, I am running a script to deploy an Ubuntu Instance using an Azure ARM Script. The script basically requests for an input for Location, Resource Group Name and VM name. But since I haven’t yet authenticated against Azure from this session, the script fails and asks me to visit the page and enter a unique code to authenticate.

  2. Get to a browser and navigate to the page and enter the code as displayed within the terminal

  3. Log on using Azure credentials

  4. Post Sign in, you can head back into your terminal

  5. From the terminal PowerShell session, you are now connected to your Azure Tenant, in the screenshot below I am choosing a particular Subscription ID to provision my Resource Group.

  6. Let’s try that script again with the parameters,

  7. Watching the progress on the portal


  8. Deploying a Linux workload on Azure is crazy fast and the progress is updated within the terminal including the connection string to SSH onto the Ubuntu instance that’s just been deployed.

  9. Connecting to the Ubuntu instance on Azure from a Terminal session

That’s pretty much it! Have fun