💡 Learn more : App Service Documentation.

Use PowerShell to quickly see if your Deployment Slot Swapped Successfully

A common scenario after sending a swap action to Azure App Service is to check its progress. While you can easily use the Azure Portal, another alternative that I often use is PowerShell.

You'll quickly learn that Microsoft.Web/sites/slots/slotsswap/action contains the information "Succeeded" that you are looking for at the 50th character if you start digging around in the PowerShell and Azure docs.

We can wrap this up in a bow with the following line:

$a = Get-AzureRmLog -ResourceGroupName <ResourceGroupName> | Where-Object { $_.operationname.value -contains "Microsoft.Web/sites/slots/slotsswap/action" -and $_.Status.Value -eq 'Succeeded'} 
$a | select { $_.eventtimestamp,$_.operationname.value,$_.status.value,$_.resourceid.substring(50) }

Now if you paste this in PowerShell, you should get the following:

As always, I hoped this help someone out there!