In this article, you’ll learn about Azure Virtual Machine – Run Command.
The Run Command feature uses the virtual machine (VM) agent to run PowerShell scripts within an Azure Windows VM. You can use these scripts for general machine or application management. Run Command can run scripts on your virtual machines remotely by using the VM agent
It’s one of the only ways to troubleshot and remediate a virtual machine that doesn’t have the RDP or SSH port open because of improper network or administrative user configuration.
The following restrictions apply when you’re using Run Command
- Output is limited to the last 4,096 bytes (4 KB).
- Scripts run as System on Windows.
- One script at a time can run.
- You can’t cancel a running script.
- The maximum time a script can run is 90 minutes. After that, it will time out.
- Outbound connectivity (port 443) from the VM is required to return the results of the script.