How to run a script on an existing Azure Virtual Machine

added by DotNetKicks
1/28/2019 12:37:42 PM


We were recently looking for a way to run a script on an Azure Virtual Machine that already existed (i.e. not executing it at provisioning time). Whilst there are ways to do this remotely (using PowerShell remoting, for example), these tend to require updating the VM's networking configuration to open up ports or allow traffic from specific IPs, which was something we were not necessarily able to do in this case.