Azure Run Command allows
Restrictions
The following restrictions apply when using Run Command:
- Output is limited to last 4096 bytes
- The minimum time to run a script is about 20 seconds
- Scripts run as System on Windows
- One script at a time may run
- Scripts that prompt for information (interactive mode) are not supported.
- You cannot cancel a running script
- The maximum time a script can run is 90 minutes, after which it will time out
- Outbound connectivity from the VM is required to return the results of the script.
Permission for Run Command
Azure Run commands needs Contributor permission on Azure VM to run the commands.
How to use Azure Run Command
Select a running Azure VM > operations > Run Command

Run a PowerShell Script ipconfig / all


Run a Powershell command to check the Admin Account Status

Run a Powershell command to Enabled Web Server role on a VM


Cheers!!