Azure – Certification 70-532-Part 5 – Working with Azure CLI

Hello Friends,
Hope you all are doing good !!!
Let’s continuing with our posts on Azure Exam 70-532: Developing Microsoft Azure Solutions.

Today in this blog, we will discuss a new Microsoft service CLI (Command Line Interface). Azure Cloud Shell is a service from Microsoft that allows you to have a PowerShell or Bash console right from within your browser. Because it’s browser-based, you don’t have to worry about having any local setup to run PowerShell or Bash. Azure Cloud Shell is truly what the cloud was created for.

Azure Cloud Shell provides browser-based authenticated shell access to Azure from virtually anywhere. Cloud Shell gives the users a rich environment with common tools, that is updated and maintained by Microsoft.
Currently, Azure Cloud Shell provides two environments that can be launched from Azure Portal, dedicated URL, Azure documentation, Visual Studio Code via the Azure Account extension, and Azure App.

  • Bash in Cloud Shell that runs Bash shell on Ubuntu Linux, which was made generally available in November 2017.
  • Power Shell in Cloud Shell that runs Windows Power Shell 5.1 on Windows Server Core and has been in preview since September 2017.

Now lets configure the Command Line Interface and test few Azure command step by step :).

  1. Connect to your Azure portal dashboard using your subscription account. If you don’t have any subscription, in that case you can get trial Azure subscription with one-month of validity. Then you can connect to the azure portal dashboard as in following figure.
    Azure portal dashboard
    Figure 1: Azure Certification 70-532 – portal dashboard

  2. Once we are on Azure dashboard, we can click on Command Shell icon to start with configuring the Cloud Shell if it is for the first time or lunch the Cloud Shell as in following figure.
    1_Lunch Cloud Shell
    Figure 2: Azure Certification 70-532 – Lunch Cloud Shell

  3. It will lunch a small window with two different option as described at top of the blog.We need to select power shell to proceed with the configuration as in following figure.
    Create Required Storage
    Figure 3: Azure Certification 70-532 – Create Required Storage

  4. After selecting the power shell, it will open another small window and ask to create a Storage. To create a storage for the configuration, Click Create Storage button, in back ground, it will maintain a container to share the required files and it will finish with the configuration and lunch the Azure Cloud Shell, as shown in following figure.
    Lunching Azure Cloud Shell
    Figure 4: Azure Certification 70-532 – Lunching Azure Cloud Shell

  5. We have done with the configuration and now, we will do some testing.For that let’s find out some Azure commands by using Help option of Azure command as shown in the following figure.

    List of Azure Commands
    Figure 5: Azure Certification 70-532 – List of Azure Commands

  6. In the above figure, we can see many Azure commands, like for Group,VM,Web App, role etc.Now we will start our testing with Azure Group Command.So to continue with Azure group Command, let’s check the available commands for Azure Groups, as shown in the following figure.

    List of Azure Group Commands
    Figure 6: Azure Certification 70-532 – List of Azure Group Commands

  7. Using Group command, now we will see the list of Azure Resource Group exists in West India location by providing the location as command’s query parameter.After executing the command, we can see that, currently only one Azure Resource Group exist for West India location, as shown in the following figure.

    List of Azure Resource Group In West India
    Figure 7: Azure Certification 70-532 – List of Azure Resource Group under West India

  8. Now let’s create a new Resource Group under West India location, as shown in the following figure.

    Create new Azure Resource Group under West India
    Figure 8: Azure Certification 70-532 – Create new Azure Resource Group under West India

  9. Now let’s create a new Resource Group under West India location using Azure Group Command, as shown in the following figure.

    Create new Azure Resource Group under West India
    Figure 9: Azure Certification 70-532 – Create new Azure Resource Group under West India

  10. Now let’s create a new Resource Group named as “ManasTestResource” under West India location using Azure Group Command, as shown in the following figure.

    Create new Azure Resource Group under West India
    Figure 10: Azure Certification 70-532 – Create new Azure Resource Group under West India
    Created new Azure Resource Group under West India
    Figure 11: Azure Certification 70-532 – Created new Azure Resource Group under West India

  11. Now let’s delete the newly created Resource Group under West India location using Azure Group Command, as shown in the following figure.

    Delete newly created Azure Resource Group under West India
    Figure 12: Azure Certification 70-532 – delete newly created Azure Resource Group under West India

    List of Azure Resource Group under West India after execute the delete comand
    Figure 11: Azure Certification 70-532 – List of Azure Resource Group under West India after execute the Delete option of Group comand

  12. As we saw in the above example, we can easily manage many things using power shell without configuring anything in local environment.In this way we can manage VM,Web app, Role etc.Please find following very useful references for further information.

    https://azure.microsoft.com/en-in/blog/pscloudshellrefresh/

    https://docs.microsoft.com/en-us/cli/azure/?view=azure-cli-latest

    https://docs.microsoft.com/en-us/cli/azure/?view=azure-cli-latest

I hope this blog, gives you basic understanding about Command Line Interface.

Thanks for reading 🙂

Keep reading, share your thoughts, experiences. Feel free to contact us to discuss more. If you have any suggestion / feedback / doubt, you are most welcome.

Stay tuned on Knowledge-Junction, will come up with more such articles.

More Posts On Exam 70-532: Developing Microsoft Azure Solutions :

Azure – Certification 70-532-Part 1-Create New Azure Virtual Machine

Azure – Certification 70-532-Part 2 – Managing Azure Virtual Machine Disks

Azure – Certification 70-532-Part 3 – Create An Azure Storage Account.

Azure – Certification 70-532-Part 4- Configuring Shared Storage Using Azure File Service

Advertisements

Comments

One comment on “Azure – Certification 70-532-Part 5 – Working with Azure CLI”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.