Auto Start VM Function Azure

<p>host.json</p><div><pre> </pre></div><div><p>[pastacode lang="markdown" manual="{

"version": "2.0",

"managedDependency": {

"Enabled": true


"extensionBundle": {

"id": "Microsoft.Azure.Functions.ExtensionBundle",

"version": "[3.*, 4.0.0)"


"functionTimeout": "00:10:00"

}" message="" highlight="" provider="manual"/]</p></div><div>Requirments.json</div><div> </div><div><p>[pastacode lang="markdown" manual="# This file enables modules to be automatically managed by the Functions service.
# See for additional information.
# For latest supported version, go to ''.
# To use the Az module in your function app, please uncomment the line below.
'Az' = '9.*'
}" message="" highlight="" provider="manual"/]</p></div><p>run.ps1 ( Does not work with multiple VM's ) </p><p>[pastacode lang="powershell" manual="# Input bindings are passed in via param block.

$subscriptionId = "xxxxxxxxxxxxxx"
$tenantId = "xxxxxxxxxxxxxx"
$rsgName = "xxxxxxxxxxxxxx"
$vmName = "xxxxxxxxxxxxxx"

Select-AzSubscription -SubscriptionID $subscriptionId -TenantID $tenantId\
Write-Warning "Starting $vmName"
Start-AzVM -ResourceGroupName $rsgName -Name $vmName" message="" highlight="" provider="manual"/]</p>
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)