diff --git a/src/Websites/Websites/ChangeLog.md b/src/Websites/Websites/ChangeLog.md index dff2d5a768b0..bf13788cb1ab 100644 --- a/src/Websites/Websites/ChangeLog.md +++ b/src/Websites/Websites/ChangeLog.md @@ -23,6 +23,7 @@ * Fixed `Set-AzWebApp` to set the AppSettings * updated `Set-AzWebAppSlot` to set FtpsState * Added support for StaticSites. +* fixed issue that defaults AlwaysOn to false in `Set-AzWebAppSlot` ## Version 2.5.0 * Updated `Add-AzWebAppAccessRestrictionRule` to allow all supported Service Tags and validate against Service Tag API. diff --git a/src/Websites/Websites/Cmdlets/DeploymentSlots/SetAzureWebAppSlot.cs b/src/Websites/Websites/Cmdlets/DeploymentSlots/SetAzureWebAppSlot.cs index 5b2b7b2fccb7..938078c9a90e 100644 --- a/src/Websites/Websites/Cmdlets/DeploymentSlots/SetAzureWebAppSlot.cs +++ b/src/Websites/Websites/Cmdlets/DeploymentSlots/SetAzureWebAppSlot.cs @@ -181,7 +181,7 @@ public override void ExecuteCmdlet() parameters.Contains("Use32BitWorkerProcess") ? (bool?)Use32BitWorkerProcess : null, AutoSwapSlotName = parameters.Contains("AutoSwapSlotName") ? AutoSwapSlotName : null, NumberOfWorkers = parameters.Contains("NumberOfWorkers") ? NumberOfWorkers : WebApp.SiteConfig.NumberOfWorkers, - AlwaysOn = parameters.Contains("AlwaysOn") ? (bool)AlwaysOn : false, + AlwaysOn = parameters.Contains("AlwaysOn") ? (bool?)AlwaysOn : null, FtpsState = parameters.Contains("FtpsState") ? FtpsState : WebApp.SiteConfig.FtpsState }; }