📜  azure powershell runbook 启动虚拟机 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:35.331000             🧑  作者: Mango

代码示例1
## Connect to Azure via your RunAsAccount
$Conn = Get-AutomationConnection -Name AzureRunAsConnection
Connect-AzureRmAccount -ServicePrincipal -Tenant $Conn.TenantID -ApplicationId $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint | Out-Null
## To be executed
Start-AzureRmVM -ResourceGroupName "ServerGroup" -Name "Server01"