Hello @Chaitrali Deshmukh ,
Thanks for reaching out to Microsoft QnA. Happy to answer your question.
You can run shell scripts via Run Command option present under VM blade, but to run these commands successfully please make sure the Guest Agent/VM agent status is in "Ready state". If the agent status is in not ready state, then the commands will not get executed.
To run custom shell scripts on Linux VMs, navigate to Run command -> Run shell script, or use the az vm run-command invoke.
In the above example, you have remotely created a directory called chai, and the directory gets created under the path /var/lib/waagent/run-command/download/.
In this path, you will come across multiple directories, mostly in numbers (for eg, 1,2,3, etc), navigate to the most recently created directory, under that directory you will find the most recently created directory chai.
I have done a repro in my lab and this is where all my remote commands are getting executed.
Hope this helps. Please feel free to reach back in case of any queries.
-----------------
Please accept as answer
and upvote
if the information provided is helpful.