How to run .bat file in Cloud shell

Niu, Chuang (Contractors) 65 Reputation points
2024-02-15T02:46:31.6+00:00

Hi all, I want run .bat file in CloudShell like run .bat file in Windows PowerShell. The content of the file looks like this.

#Create directory
az storage fs directory create --name root --file-system $storagecontainerName --account-name $accountName
az storage fs directory create --name root\hierarchya\hierarchya_1 --file-system $storagecontainerName --account-name $accountName
az storage fs directory create --name root\hierarchyb\hierarchyb_1\hierarchyb_101 --file-system $storagecontainerName --account-name $accountName


But i dont know how can do this, does anyone know how to do this? Thanks a lot. Chuang

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,552 questions
0 comments No comments
{count} votes

Accepted answer
  1. dashanan13 930 Reputation points
    2024-02-15T23:10:07.6066667+00:00

    Hei Niu, Chuang (Contractors),

    Thank you for contacting Microsoft Community. As i understand, you want to run a bat file on the shell hosted on Azure portal. If this is the need, it can be achived as folllows: Upload the file to the shell Change permission for execution with "chmood +x <filename>" execute the file

    • I have attached the video for reference

    If you feel like this helped, consider marking this as answer. sol


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.