< Back
Set-AzureWebsite
Post
NAME Set-AzureWebsite
SYNOPSIS
Configure a Microsoft Azure website
SYNTAX
Set-AzureWebsite [-NumberOfWorkers <Int32>] [-DefaultDocuments <String[]>] [-NetFrameworkVersion <String>] [-PhpVersion <String>]
[-RequestTracingEnabled <Boolean>] [-HttpLoggingEnabled <Boolean>] [-DetailedErrorLoggingEnabled <Boolean>] [-HostNames <String[]>] [-AppSettings
<Hashtable>] [-Metadata <NameValuePair>] [-ConnectionStrings <ConnStringPropertyBag>] [-HandlerMappings <HandlerMapping[]>] [[-SiteWithConfig]
<SiteWithConfig>] [[-Name] <String>] [-PassThru <Switch>] [[-ManagedPipelineMode] <String>] [[-WebSocketsEnabled] <String>] [[-Slot] <String>]
[-RoutingRules <Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.RampUpRule>] [-Use32BitWorkerProcess <Boolean>]
[<CommonParameters>]
DESCRIPTION
Configure a Microsoft Azure website
PARAMETERS
-NumberOfWorkers <Int32>
The number of worker processes executing the website
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
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
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-PhpVersion <String>
The PHP version required by the website
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
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
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
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
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
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Metadata <NameValuePair>
The Metadata for the website
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-ConnectionStrings <ConnStringPropertyBag>
The connection strings used by the website
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-HandlerMappings <HandlerMapping[]>
The Handler Mappings used by the website
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-SiteWithConfig <SiteWithConfig>
The configuration used by the website
Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-PassThru <Switch>
When specified, a boolean value is returned
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Name <String>
The name of the website
Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-ManagedPipelineMode <String>
The managed pipeline mode
Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-WebSocketsEnabled <String>
Flag to enable/disable websockets
Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Slot <String>
The slot name
Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-RoutingRules <Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.RampUpRule>
Routing rules used for testing in production
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Use32BitWorkerProcess [<Boolean>]
Indicates if 32-bit mode is enabled.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Keywords: azure, azuresm, servicemanagement, management, service, utilities
-------------- Enable HTTP Logging --------------
C:\\PS>Set-AzureWebsite -HttpLoggingEnabled 1
Enable http logging
-------------- Set storage credentials --------------
C:\\PS>$settings = New-Object Hashtable
$settings["AZURE_STORAGE_ACCOUNT"] = myaccountname
$settings["AZURE_STORAGE_ACCESS_KEY"] = myaccesskey
Set-AzureWebsite -AppSettings $settings myWebsite
Sets up environment variables for AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY in the website myWebsite
-------------- Enable Drive Logging --------------
C:\\PS>Set-AzureWebsite -AzureDriveTraceEnabled $true
Enable drive logging for the specified website
-------------- Set routing rules for testing in production --------------
C:\\PS>$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
Sets up a routing for 10 percent of the traffic to staging slot.
RELATED LINKS
New-AzureWebsite
Get-AzureWebsite
SYNOPSIS
Configure a Microsoft Azure website
SYNTAX
Set-AzureWebsite [-NumberOfWorkers <Int32>] [-DefaultDocuments <String[]>] [-NetFrameworkVersion <String>] [-PhpVersion <String>]
[-RequestTracingEnabled <Boolean>] [-HttpLoggingEnabled <Boolean>] [-DetailedErrorLoggingEnabled <Boolean>] [-HostNames <String[]>] [-AppSettings
<Hashtable>] [-Metadata <NameValuePair>] [-ConnectionStrings <ConnStringPropertyBag>] [-HandlerMappings <HandlerMapping[]>] [[-SiteWithConfig]
<SiteWithConfig>] [[-Name] <String>] [-PassThru <Switch>] [[-ManagedPipelineMode] <String>] [[-WebSocketsEnabled] <String>] [[-Slot] <String>]
[-RoutingRules <Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.RampUpRule>] [-Use32BitWorkerProcess <Boolean>]
[<CommonParameters>]
DESCRIPTION
Configure a Microsoft Azure website
PARAMETERS
-NumberOfWorkers <Int32>
The number of worker processes executing the website
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
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
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-PhpVersion <String>
The PHP version required by the website
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
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
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
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
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
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Metadata <NameValuePair>
The Metadata for the website
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-ConnectionStrings <ConnStringPropertyBag>
The connection strings used by the website
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-HandlerMappings <HandlerMapping[]>
The Handler Mappings used by the website
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-SiteWithConfig <SiteWithConfig>
The configuration used by the website
Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-PassThru <Switch>
When specified, a boolean value is returned
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Name <String>
The name of the website
Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-ManagedPipelineMode <String>
The managed pipeline mode
Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-WebSocketsEnabled <String>
Flag to enable/disable websockets
Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Slot <String>
The slot name
Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-RoutingRules <Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.RampUpRule>
Routing rules used for testing in production
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Use32BitWorkerProcess [<Boolean>]
Indicates if 32-bit mode is enabled.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Keywords: azure, azuresm, servicemanagement, management, service, utilities
-------------- Enable HTTP Logging --------------
C:\\PS>Set-AzureWebsite -HttpLoggingEnabled 1
Enable http logging
-------------- Set storage credentials --------------
C:\\PS>$settings = New-Object Hashtable
$settings["AZURE_STORAGE_ACCOUNT"] = myaccountname
$settings["AZURE_STORAGE_ACCESS_KEY"] = myaccesskey
Set-AzureWebsite -AppSettings $settings myWebsite
Sets up environment variables for AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY in the website myWebsite
-------------- Enable Drive Logging --------------
C:\\PS>Set-AzureWebsite -AzureDriveTraceEnabled $true
Enable drive logging for the specified website
-------------- Set routing rules for testing in production --------------
C:\\PS>$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
Sets up a routing for 10 percent of the traffic to staging slot.
RELATED LINKS
New-AzureWebsite
Get-AzureWebsite