title: Start VM, run exe, stop VM in azure automation
body: <p>I want to start an exe that is located in a VM every day. The exe is 5 minutes long, so I want to use azure automation to start the vm, run the exe, and when it's finished, stop the vm.</p>
  
  <p>I've looked at some resources on the web, and I can start the VM with :</p>
  
  <pre><code>Start-AzureVM -Name $VMName -ServiceName $ServiceName
  </code></pre>
  
  <p>I've seen in examples that people stop vm in other job at a certain time, but is it possible to start the vm, run an exe and stop the vm when the exe has terminated ?</p>