Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Publish-AzureWebsiteProject

Publish-AzureWebsiteProject

microsoft.windowsazure.commands.dll

Synopsis

Publish a Visual Studio web project to a Microsoft Azure web site using WebDeploy.

Syntax

Publish-AzureWebsiteProject [-Name] [-Package] [-ConnectionString] [-Slot] [<CommonParameters>]

Publish-AzureWebsiteProject [-Name] [-ProjectFile] [-Configuration] [-ConnectionString] [-Slot] [<CommonParameters>]

Detailed Description

Publish a Visual Studio web project to a Microsoft Azure web site using WebDeploy. It can either take a WebDeploy package and publish directly, or take a Visual Studio web project, build the project and publish. It can also replace the connection strings in the Web.config during publish.

Parameters

-Name <string>

The web site name.

Aliases

None

Required?

false

Position

1

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Slot <string>

The web site slot name.

Aliases

None

Required?

false

Position

named

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-ProjectFile <string>

The Visual Studio web application project to be published.

Aliases

None

Required?

true

Position

2

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Configuration <string>

The configuration used to build the Visual Studio web application project.

Aliases

None

Required?

false

Position

3

Default value

Release

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Package <string>

The WebDeploy package folder for zip file of the Visual Studio web application project to be published.

Aliases

None

Required?

true

Position

2

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-ConnectionString <Hashtable>

The connection strings to use for the deployment.

Aliases

None

Required?

true

Position

4

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

-------------------------- EXAMPLE 1 --------------------------

C:\PS>

Description

-----------

Build a Visual Studio web project with "Debug" configuration (meaning use Web.Debug.config) and publish to a Microsoft Azure Web Site using WebDeploy.

  Publish-AzureWebsiteProject -Name site1 -ProjectFile .\WebApplication1.csproj -Configuration Debug                        

-------------------------- EXAMPLE 2 --------------------------

C:\PS>

Description

-----------

Publish a WebDeploy Pacakge .zip file to a Microsoft Azure Web Site using WebDeploy.

  Publish-AzureWebsiteProject -Name site1 -Package .\WebApplication1.zip                        

-------------------------- EXAMPLE 3 --------------------------

C:\PS>

Description

-----------

Publish a WebDeploy Pacakge folder to a Microsoft Azure Web Site using WebDeploy.

  Publish-AzureWebsiteProject -Name site1 -Package .\WebApplication1                        

-------------------------- EXAMPLE 4 --------------------------

C:\PS>

Description

-----------

Build a Visual Studio web project, overwrite the "DefaultConnection" connection string in Web.config and publish to a Microsoft Azure Web Site using WebDeploy.

          Publish-AzureWebsiteProject -Name site1 -ProjectFile .\WebApplication1.csproj -ConnectionString @{ DefaultConnection = "my connection string" }
        

-------------------------- EXAMPLE 5 --------------------------

C:\PS>

Description

-----------

Build a Visual Studio web project, overwrite the "DefaultConnection" connection string in Web.config and publish to a Microsoft Azure Web Site using WebDeploy. Notice that -DefaultConnection is a dynamic parameter which gets added by parsing Web.config.

  Publish-AzureWebsiteProject -Name site1 -ProjectFile .\WebApplication1.csproj -DefaultConnection "my connection string"                        

New-AzureWebsite
Get-AzureWebsite
Set-AzureWebsite
Remove-AzureWebsite