Eddie's answer was close to what I needed, the only thing missing was a way to specify a slot for deployment:
stopapp.ps1
param($websiteName, $websiteSlot) $website = Get-AzureWebsite -Name $websiteName -Slot $websiteSlot Stop-AzureWebsite -Name $websiteName -Slot $websiteSlot
startapp.ps1
param($websiteName, $websiteSlot) $website = Get-AzureWebsite -Name $websiteName -Slot $websiteSlot Start-AzureWebsite -Name $websiteName -Slot $websiteSlot
And then in your Azure PowerShell Script task, the arguments could be something like this:
-websiteName "{mywebsite}" -websiteSlot "{mydeploymentslot}"
source share