Powershell 啟動/停止azure web app
以下是透過powershell去開關azure web service的方法
#============install azure powershell module ===========
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Install-Module -Name PowerShellGet -Force
Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force
#=======================
# Logging in to Azure
Connect-AzAccount -TenantId 305675df-dc39-4b66-8034-b8e7CCCCCC <-這個換成你AZURE AD的租戶編號
在這裡
Stop-AzWebApp -ResourceGroupName "LAB" -Name "fenderweb"
Start-AzWebApp -ResourceGroupName "LAB" -Name "fenderweb"
your code herefooter See also :
留言