Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

azure powershell runbook to start a virtual machine

## 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"
Source by paegelow.se #
 
PREVIOUS NEXT
Tagged: #azure #powershell #runbook #start #virtual #machine
ADD COMMENT
Topic
Name
2+9 =