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
 

Set-AzureWebsite

Set-AzureWebsite

microsoft.windowsazure.commands.dll

Synopsis

Configure a Microsoft Azure website

Syntax

Set-AzureWebsite [-NumberOfWorkers] [-DefaultDocuments] [-NetFrameworkVersion] [-PhpVersion] [-RequestTracingEnabled] [-HttpLoggingEnabled] [-DetailedErrorLoggingEnabled] [-HostNames] [-AppSettings] [-Metadata] [-ConnectionStrings] [-HandlerMappings] [-SiteWithConfig] [-Name] [-PassThru] [-ManagedPipelineMode] [-WebSocketsEnabled] [-Slot] [-RoutingRules] [-Use32BitWorkerProcess] [<CommonParameters>]

Detailed Description

Configure a Microsoft Azure website

Parameters

-NumberOfWorkers <Int32>

The number of worker processes executing the website

Aliases

None

Required?

false

Position

named

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-DefaultDocuments <String[]>

The documents that are automatically displayed when browsing the website

Aliases

None

Required?

false

Position

named

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-NetFrameworkVersion <String>

The version of the .Net Framework required by the website

Aliases

None

Required?

false

Position

named

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-PhpVersion <String>

The PHP version required by the website

Aliases

None

Required?

false

Position

named

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-RequestTracingEnabled <Boolean>

Determines whether request tracing is enabled for the website

Aliases

None

Required?

false

Position

named

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-HttpLoggingEnabled <Boolean>

Determines whether http logging is enabled for the website

Aliases

None

Required?

false

Position

named

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-DetailedErrorLoggingEnabled <Boolean>

Determines whether detailed iis errors are logged for the website

Aliases

None

Required?

false

Position

named

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-HostNames <String[]>

The fully qualified hostnames that can be used to access the website

Aliases

None

Required?

false

Position

named

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-AppSettings <Hashtable>

The environment variables that will be used by the website

Aliases

None

Required?

false

Position

named

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Metadata <NameValuePair>

The Metadata for the website

Aliases

None

Required?

false

Position

named

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-ConnectionStrings <ConnStringPropertyBag>

The connection strings used by the website

Aliases

None

Required?

false

Position

named

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-HandlerMappings <HandlerMapping[]>

The Handler Mappings used by the website

Aliases

None

Required?

false

Position

named

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-SiteWithConfig <SiteWithConfig>

The configuration used by the website

Aliases

None

Required?

false

Position

2

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-PassThru <>

When specified, a boolean value is returned

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Name <String>

The name of the website

Aliases

None

Required?

false

Position

1

Default value

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-ManagedPipelineMode <>

The managed pipeline mode

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-WebSocketsEnabled <>

Flag to enable/disable websockets

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Slot <>

The slot name

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-RoutingRules <>

Routing rules used for testing in production

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Use32BitWorkerProcess <>

Indicates if 32-bit mode is enabled.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

-------------- Enable HTTP Logging --------------

C:\PS>

Enable http logging

Set-AzureWebsite -HttpLoggingEnabled 1

-------------- Set storage credentials --------------

C:\PS>

Sets up environment variables for AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY in the website myWebsite

          $settings = New-Object Hashtable
          $settings["AZURE_STORAGE_ACCOUNT"] = myaccountname
          $settings["AZURE_STORAGE_ACCESS_KEY"] = myaccesskey
          Set-AzureWebsite -AppSettings $settings myWebsite
        

-------------- Enable Drive Logging --------------

C:\PS>

Enable drive logging for the specified website

          Set-AzureWebsite -AzureDriveTraceEnabled $true
        

-------------- Set routing rules for testing in production --------------

C:\PS>

Sets up a routing for 10 percent of the traffic to staging slot.

          $rule = New-Object Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.RampUpRule
          $rule.ActionHostName = "mysite-staging.azurewebsites.net"
          $rule.ReroutePercentage = 10;
          $rule.Name = "rule1"

          Set-AzureWebsite mysite -RoutingRules $rule
        

New-AzureWebsite
Get-AzureWebsite