Set-AzureRmWebApp

Modifies an Azure Web App.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Set-AzureRmWebApp
   [[-AppServicePlan] <String>]
   [[-DefaultDocuments] <String[]>]
   [[-NetFrameworkVersion] <String>]
   [[-PhpVersion] <String>]
   [[-RequestTracingEnabled] <Boolean>]
   [[-HttpLoggingEnabled] <Boolean>]
   [[-DetailedErrorLoggingEnabled] <Boolean>]
   [[-AppSettings] <Hashtable>]
   [[-ConnectionStrings] <Hashtable>]
   [[-HandlerMappings] <System.Collections.Generic.IList`1[Microsoft.Azure.Management.WebSites.Models.HandlerMapping]>]
   [[-ManagedPipelineMode] <String>]
   [[-WebSocketsEnabled] <Boolean>]
   [[-Use32BitWorkerProcess] <Boolean>]
   [[-AutoSwapSlotName] <String>]
   [-ContainerImageName <String>]
   [-ContainerRegistryUrl <String>]
   [-ContainerRegistryUser <String>]
   [-ContainerRegistryPassword <SecureString>]
   [-EnableContainerContinuousDeployment <Boolean>]
   [-HostNames <String[]>]
   [-NumberOfWorkers <Int32>]
   [-AsJob]
   [-AssignIdentity <Boolean>]
   [-HttpsOnly <Boolean>]
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Set-AzureRmWebApp
   [[-Use32BitWorkerProcess] <Boolean>]
   [[-AutoSwapSlotName] <String>]
   [-NumberOfWorkers <Int32>]
   [-AsJob]
   [-WebApp] <PSSite>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Set-AzureRmWebApp cmdlet sets an Azure Web App.

Examples

Example 1

PS C:\> Set-AzureRmWebApp -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -HttpLoggingEnabled $true

This command sets HttpLoggingEnabled to true for Web App ContosoWebApp associated with the resource group Default-Web-WestUS

Parameters

-AppServicePlan

App Service Plan Name

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

-AppSettings

App Settings HashTable

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

-AsJob

Run cmdlet in the background

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

-AssignIdentity

Enable/disable MSI on an existing azure webapp or functionapp

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

-AutoSwapSlotName

Destination slot name for auto swap

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

-ConnectionStrings

Connection Strings HashTable

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

-ContainerImageName

Container Image Name

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

-ContainerRegistryPassword

Private Container Registry Password

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

-ContainerRegistryUrl

Private Container Registry Server Url

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

-ContainerRegistryUser

Private Container Registry Username

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

-DefaultDocuments

Default Documents String Array

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

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DetailedErrorLoggingEnabled

Detailed Error Logging Enabled Boolean

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

-EnableContainerContinuousDeployment

Enables/Disables container continuous deployment webhook

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

-HandlerMappings

Handler Mappings IList

Type:IList<T>[HandlerMapping]
Position:11
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HostNames

WebApp HostNames String Array

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

-HttpLoggingEnabled

HttpLoggingEnabled Boolean

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

-HttpsOnly

Enable/disable redirecting all traffic to HTTPS on an existing azure webapp or functionapp

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

-ManagedPipelineMode

Managed Pipeline Mode Name

Type:String
Accepted values:Classic, Integrated
Position:12
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

WebApp Name

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

-NetFrameworkVersion

Net Framework Version

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

-NumberOfWorkers

The number of workers to be allocated

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

-PhpVersion

Php Version

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

-RequestTracingEnabled

Request Tracing Enabled

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

-ResourceGroupName

Resource Group Name

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

-Use32BitWorkerProcess

Use 32-bit Worker Process Boolean

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

-WebApp

WebApp Object

Type:PSSite
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WebSocketsEnabled

WebSocketsEnabled Boolean

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

Inputs

Int32

Parameters: NumberOfWorkers (ByValue)

String

Site

Parameters: WebApp (ByValue)

Outputs

Site