We are creating a multi-tenant application and hosting it on Window Azure IaaS platform. We want to provision and configure all our virtual machines remotely using PowerShell. We don't want to RDP into VMs for any configuration.
Does Azure VMs support start up tasks to execute power shell scripts similar to Web-Role and Worker-Role?
If no, then are there any alternatives available (tools like PsExec) which can help in executing start-up scripts?
Your VM's are just virtualized Windows/Linux machines and this support start-up tasks as per usual.
For Windows VM's, you'll need to:
Note: You can also access PowerShell on a remote VM using PowerShell remoting in a similar manner to how one uses SSH to access the console of a remote [LI|U]N[U|I]X box/VM.
FWIW, Git is a great tool to use to pull down and execute a VM config script: Your on-VM startup script can use Chocolatey to install the latest version of GIT (if it's not already installed) and then use Git to pull down the latest version of your startup script from GitHub/similar and execute it. This way you don't need to continually rebuild VM images every time your scripts change.