Is any way to restart the Azure Web App programmatically, i.e. Kudu or some another kind?
I'v found that it is possible using Management Libraries, but it is not applicable for me since I can't create application in AD.
Powershell:
Restart-AzureRmWebApp -ResourceGroupName xxx -Name xxx
or using the provider operation:
Invoke-AzureRmResourceAction -ResourceGroupName xxx -ResourceType 'Microsoft.Web/sites' -ResourceName xxx `
-ApiVersion '2015-08-01' -Action 'Restart' -Force
Azure Cli (nodejs, depreciated):
azure webapp restart --resource-group xxx --name xxx
Azure Cli (python):
az appservice web restart --resource-group xxx --name xxx
or you can use Rest Api
I'm assuming you're looking for this feature because you or folks on your team don't have elevated permissions on the Azure Portal.
Creating scripts will work, but it still requires someone to be comfortable with running command lines.
The best way I found to do this is with VSTS pipeline. A few clicks and it's restarted. A simple and awesome way to build a devops culture.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With