Deploy Application Using Powershell On Azure

This blog is about deploying web applications using PowerShell.
 
First, we will see how to create a deployment package.
  1. In Visual Studio, go to your Application.
  2. Right click on your Application and select 'Publish'.
  3. In 'Profile' tab, select a publish target.(Windows Azure Websites/ Import/ Custom)
  4. In 'Connection' tab, select publish method as 'Web Deploy Package'. Provide the package location and site name.
  5. Find required deployment package on the provided location. 
Publish Application, using PowerShell steps to follow.
  1. Open Windows/ Azure Powershell in an administrator mode.
  2. Add Azure account.

    1. Add-AzureAccount

  3. Select azure subscription.

    1. Get-AzureSubscription
    2. Select-AzureSubscription -SubscriptionId c1553b93-b0cb-****-****-************ 
    3. Get-AzureSubscription -Default 

  4. Command to deploy the Application,

    Publish-AzureWebsiteProject -Name "PowershellDeploy" -Package "C:\Users\Ashish\Desktop\PowershellPublish.zip" Here, PowershellDeploy is my azure website name where I want to deploy application and "C:\Users\Ashish\Desktop\PowershellPublish.zip" is a path of web application deployment package.
I hopethe description given above will help you in publishing the Web Application packages on Azure, using PowerShell.
Ebook Download
View all
Learn
View all