SOF User
SOF User

Reputation: 7830

How to create an Azure Website programmatically using Azure PowerShell commands in C#?

I found all Azure Management Cmdlets here:

Windows Azure Management Cmdlets.

My question is how can I use these cmdlets in C# to create, remove and deploy an Azure Website?

Upvotes: 0

Views: 1503

Answers (3)

Jenish Zinzuvadiya
Jenish Zinzuvadiya

Reputation: 1085

Without azure login we can not fire any command. We can Create Website in following steps.

  1. Login to AzureAccount (Add-AzureAccount)
  2. Setup The Azure Subscription (Get-AzureSubscription)
  3. Select Azure Subscription (Select-AzureSubscription -Name AzureSubName)
  4. Then We Can Deploy Azure site here

Ref to deploy site : http://blogs.msdn.com/b/cdndevs/archive/2015/04/23/azure-powershell-azure-websites-for-the-command-line-junkies-part-1.aspx

Upvotes: 0

Jorge
Jorge

Reputation: 1186

Windows Azure managemnet cmdlets have been updated and now it includes web site creation. Check it here.

Upvotes: 1

Doug Finke
Doug Finke

Reputation: 6823

Here is a link to the samples from my book, PowerShell for Developers.

This example embeds the PowerShell engine in a C# application. You can then call the Azure PowerShell cmdlets and/or external PowerShell scripts that contain the workflow that you develop.

http://goo.gl/4kiYa

Upvotes: 0

Related Questions