New-​Azure​Website

Create a new website to run in Azure.

Syntax

New-AzureWebsite
   [-Git]
   [-GitHub]
   [-GithubCredentials <PSCredential>]
   [-GithubRepository <String>]
   [-Hostname <String>]
   [-Location <String>]
   [-Name <String>]
   [-Profile <AzureSMProfile>]
   [-PublishingUsername <String>]
   [-Slot <String>]
   [<CommonParameters>]

Description

This topic describes the cmdlet in the 0.8.10 version of the Microsoft Azure PowerShell module. To get the version of the module you're using, in the Azure PowerShell console, type (Get-Module -Name Azure).Version.

The cmdlet creates a new website to run in Azure and prepares for deployment through Github.

Examples

Example 1: Create a new website with Git

PS C:\> New-AzureWebsite mySite -Git

This example creates a new website in Azure and a local Git repository to use for deploying files to the new website.

Example 2: Create website integrated with Github

PS C:\> New-AzureWebsite mysite -Github -GithubRepository myaccount/myrepo

This example creates a new website linked to a Github repository named myaccount/myrepo. Commits to the Github repository are pushed to the website in Azure.

Optional Parameters

-Git

Sets up a local Git repository and links it to the website. If specified, this parameter sets up a Git repository in the local directory and add a remote repository named 'azure' that links to the website in Azure.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-GitHub

Indicates that this cmdlet links the new website to an existing Github repository. Commits to the Giuthub repository are pushed to the website in Azure.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-GithubCredentials

Specifies the user name and password credentials to connect to Github.

Type:PSCredential
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-GithubRepository

Specifies the full name of the Github repository to link to this website. For example, myaccount/myrepo.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Hostname

Specifies an alternative host name for the new website.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Location

Specifies the location of the data center where you want to deploy the website.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Name

Specifies a name for the website.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Type:AzureSMProfile
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PublishingUsername

Specifies the user name you have specified in the Azure Portal for Git deployment.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Slot

Specifies a slot name for the website.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False