Introduction
In my previous article, we got an overview of CloudShell and how to use it for creating a web app in Azure. In this article, we will explore how to create an Azure Function using CloudShell (PowerShell).
Scenario
During deployment, we need to provide a more automated approach to create and manage Azure resources. In this article, we will see the step by step process of creating the Azure Function using PowerShell.
Prerequisites
- Azure cloud subscription
- Basic knowledge of PowerShell
CloudShell
- CloudShell is a feature in the Azure cloud which gives us the facility to write in commands with browser-based experience.
- CloudShell helps the Azure technical team to manage and control Azure Resources.
- We have the following choices – Bash, PowerShell.
- Secure access to authenticate account access for PowerShell and CLI.
- CloudShell is integrated to open source objects as well.
- CloudShell supports multiple languages – .NET Core, Go, Java, Nods.JS, PowerShell, and Python etc.
Now, we will focus on the actual steps using CloudShell to create an Azure Function.
Step 1
Log into Azure Portal.
Step 2
Click on the CloudShell icon. This icon is present on the top horizontal bar on Azure Portal site.
Step 3
Now, we will execute the below commands one by one.
To create a web app in Azure – first, we need to create a resource group and a service plan.

- Create variables and assign values.
- # RG and location
- $rg = "Name"
- $location = "Central US"
- #Storage Account
- $sa = "Name"
- $storageSku = 'Standard_LRS'
- # function names
- $fun1 = "functioname"
- Create Resource Group
- #create Resource Group
- New-AzureRMResourceGroup -Name $rg -Location $location

Prabu ElavarasanPosted Nov 17, 2018, 9:56 AM
Nice article..