Set-AzureWebsite

Configures a website running in Azure.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Service Management APIs. See the Az PowerShell module for cmdlets to manage Azure Resource Manager resources.

Syntax

Set-AzureWebsite
   [-NumberOfWorkers <Int32>]
   [-DefaultDocuments <String[]>]
   [-NetFrameworkVersion <String>]
   [-PhpVersion <String>]
   [-RequestTracingEnabled <Boolean>]
   [-HttpLoggingEnabled <Boolean>]
   [-DetailedErrorLoggingEnabled <Boolean>]
   [-HostNames <String[]>]
   [-AppSettings <Hashtable>]
   [-Metadata <System.Collections.Generic.List`1[Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.NameValuePair]>]
   [-ConnectionStrings <ConnStringPropertyBag>]
   [-HandlerMappings <HandlerMapping[]>]
   [-SiteWithConfig <SiteWithConfig>]
   [-PassThru]
   [-ManagedPipelineMode <ManagedPipelineMode>]
   [-WebSocketsEnabled <Boolean>]
   [-RoutingRules <System.Collections.Generic.List`1[Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.RoutingRule]>]
   [-Use32BitWorkerProcess <Boolean>]
   [-AutoSwapSlotName <String>]
   [-SlotStickyAppSettingNames <System.Collections.Generic.List`1[System.String]>]
   [-SlotStickyConnectionStringNames <System.Collections.Generic.List`1[System.String]>]
   [-Name <String>]
   [-Slot <String>]
   [-Profile <AzureSMProfile>]
   [<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 Set-AzureWebsite cmdlet configures a website running in Azure.

Examples

Example 1: Enable HTTP logging for a website

PS C:\> Set-AzureWebsite -HttpLoggingEnabled 1

This example enables HTTP logging.

Example 2: Set storage credentials for a website

PS C:\> $settings = New-Object Hashtable$settings["AZURE_STORAGE_ACCOUNT"= myaccountname$settings["AZURE_STORAGE_ACCESS_KEY"] = myaccesskeySet-AzureWebsite -AppSettings $settings myWebsite

This example sets storage credentials in a website named myWebsite with environment variables for AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY.

Parameters

-AppSettings

Specifies the environment variables that will be used by the website.

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-AutoSwapSlotName

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ConnectionStrings

Specifies the connection strings used by the website.

Type:ConnStringPropertyBag
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-DefaultDocuments

Specifies the documents that are automatically displayed when browsing the website.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-DetailedErrorLoggingEnabled

Determines whether detailed IIS errors are logged for the website.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-HandlerMappings

Specifies the handler mappings used by the website.

Type:HandlerMapping[]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-HostNames

Specifies the fully qualified host names that can be used to access the website.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-HttpLoggingEnabled

Determines whether http logging is enabled for the website.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ManagedPipelineMode

Specifies the managed pipeline mode.

Type:ManagedPipelineMode
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Metadata

Specifies the metadata for the website.

Type:List<T>[Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.NameValuePair]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specifies the name of the website.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-NetFrameworkVersion

Specifies the version of the .Net Framework required by the website.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-NumberOfWorkers

Specifies the number of worker processes running the website.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-PassThru

Indicates that this cmdlet returns a Boolean value.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PhpVersion

Specifies the PHP version required by the website.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RequestTracingEnabled

Determines whether request tracing is enabled for the website.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-RoutingRules

Specifies the routing rules to use for testing in production.

Type:List<T>[Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.RoutingRule]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-SiteWithConfig

Specifies the configuration used by the website.

Type:SiteWithConfig
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Slot

Specifies the slot name of the website.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-SlotStickyAppSettingNames

Type:List<T>[String]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-SlotStickyConnectionStringNames

Type:List<T>[String]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Use32BitWorkerProcess

Specifies whether to enable 32-bit mode.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-WebSocketsEnabled

Specifies whether to enable WebSockets.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False