I'd like to automate setup of virtual machine in Azure.
- There are some Azure Commandlets to create new VM, setup open ports for PowerShell remoting etc.
- I found script how to download certificate used for remoting (http://michaelwasham.com/windows-azure-powershell-reference-guide/introduction-remote-powershell-with-windows-azure/ ), so it's possible to connect to the machine through
New-PSSession -ComputerName $computer -Credential $creds -UseSSLand invoke some commands. - Then I need to copy some application to the virtual machine, register that in system and run.
How can I copy the file to remote machine? There are no azure command lets to use, so I can't copy the app from blob.
Possible workarounds - install chocolatey remotely, download some command line app that fetches the file from blob etc.. Is there any better way? Even AzCopy must be uploaded to the server somehow.
PModem looked nice when I saw it some years ago, but isn't there some more official approach?
I don't won't to use any other public machine reachable from the Azure VM that can be used as file server from which the remote machine can download the files.
Also I don't want to have some prepared VHD sitting in Azure as image for new virtual that has all needed preinstalled. The app might change a lot, so this doesn't scale well.