Prerequisites
- Microsoft Azure Subscription (MSDN subscribers or sign up for one month free trial)
- Windows PowerShell
To Download PowerShell Click here.
- About PowerShell Tool
- How to Create Web App using PowerShell
- How to Remove Web App using PowerShell
- Check Web App Name reserved or not
- Run Web App using PowerShell command
Step 2: After installation, Open search box and search for Windows PowerShell,
There are two type of Windows PowerShell available:
- Windows PowerShell – Command Line
- Windows PowerShell – Execute the PowerShell script such as .ps file. GUI version of Windows PowerShell.
Step 3: Add Azure Subscription with PowerShell,
Add-AzureAccountEnter your Azure Subscription credentials.
Few more commands for Azure account details.
Get-AzureAccount
Get-AzureSubscription
If there is only one subscription associate no problem but if more than one Azure account is there we need to set default azure accounts for all operations.
Select-AzureSubscription –SubscriptionId “paste-subscription-id-here”Check for default subscription
Get-AzureSubscription -DefaultStep 4: Create New Web App
New-AzureWebsite PowerShellWebApp01There is one problem; by default web app will create in “Southeast Asia” so we need to add location command when we are creating the web app.
Classic Portal
Azure Portal
Step 5:
New-AzureWebsite PowerShellWebApp01 -Location “West US”Remove Web App
Remove-AzureWebsite -Name WebAppNameEx. Remove-AzureWebsite -Name PowerShellWebApp01
Check for Web Apps Name available or not run below command
Test-AzureName -Website PowerShellWebApp01True means this name is already used
False means this name is available for creating new web apps
Open web app on browser
Show-AzureWebsite WebAppNameOnlyEx. Show-AzureWebsite PowerShellWebApp01
Congratulations you have learned PowerShell command with Web App on Azure!
Read more articles on Azure:

















Kuppurasu NagarajPosted Apr 30, 2016, 2:43 PM
Nice Sharing..
Vivek KumarPosted Apr 28, 2016, 2:44 PM
Good one
Kishor Bikram OliPosted Apr 28, 2016, 12:34 PM
great!
Mohammed IbrahimPosted Apr 28, 2016, 12:11 PM
nice
Debasis SahaPosted Apr 28, 2016, 10:47 AM
Good One..
Vignesh ManiPosted Apr 28, 2016, 8:26 AM
Nice one
Gowtham RajamanickamPosted Apr 28, 2016, 2:09 AM
good work..
Rahul Kumar SaxenaPosted Apr 28, 2016, 1:21 AM
Good Work