I'm using a 'Basic' plan. I want to create a script which can switch 'always-on' to false, then change the service plan to the free tier. When I need the function again I can reverse the settings. Why am I doing this? So I can ensure the App service plan keeps the same outbound IP addresses. I don't want to be paying for a Basic plan all the time so a simple script to do this is required.
I am using the latest 'AZ' modules.
$site = Get-AzWebApp -ResourceGroupName $ResourceGroupName -Name $SiteName
$site.SiteConfig.AlwaysOn = $false
Set-AzWebApp -ResourceGroupName $ResourceGroupName -Name $SiteName ???
Thanks