This blog is about deploying web applications using PowerShell.
First, we will see how to create a deployment package.
- In Visual Studio, go to your Application.
- Right click on your Application and select 'Publish'.
- In 'Profile' tab, select a publish target.(Windows Azure Websites/ Import/ Custom)
- In 'Connection' tab, select publish method as 'Web Deploy Package'. Provide the package location and site name.
- Find required deployment package on the provided location.
Publish Application, using PowerShell steps to follow.
- Open Windows/ Azure Powershell in an administrator mode.
- Add Azure account.
- Add-AzureAccount
- Select azure subscription.
- Get-AzureSubscription
- Select-AzureSubscription -SubscriptionId c1553b93-b0cb-****-****-************
- Get-AzureSubscription -Default
- 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.