MarriumAzizKhan-7464 avatar image
0 Votes"
MarriumAzizKhan-7464 asked YuhanDeng-MSFT edited

I want to know about Run Command Rest API that help to execute script on VM

I m calling Rest API inside my function app to place file on VM from Storage account but I am not able to link path of file in script, I am calling rest api mention here:

Whats Required:
Need to place file from storage account to VM (Windows and Centos Both VM's)

Troubleshooting and labs already done:

We did it before simply calling Invoke-AzRunCommand although we testes one file per time

Issue with Invoke_AzRunCommand: This command has some limitation and we cant upload in bulk (error on Invoke command "run command extension execution is in progress. please wait for completion before invoking a run command.)


What I found next :

Rest API :

Now I am trying to do it by using Rest API but I am getting 400/ 404 error that means bad request (may be my body is not accurate)

I need help to find out, how can we define script with Rest API Json Body, as I have 20+ lines of script save at root folder of my app.

OR if i use Invoke-AzRunCommand, how can I use it in case of bulk of files

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Based on your description, this issue seems related to Azure, thus we added Azure related tag so that it would be easier for you to get support from Azure engineers. Since we are not familiar with Azure product, if the tag is irrelevant, hope Azure engineer would route to appropriate tag.
Thanks for your understanding.
Best regards,

1 Vote 1 ·

0 Answers