Forum Discussion
How do I run a local Script using my local Azure Cli installation
- DeletedOct 03, 2024Hi Guys, I found the problem.. I can just connect Az login directly in the mac console. I was needed to Pwsh and Az login before running the script. Now it's working without issue
Deleted
First, open your Terminal app on Mac. You can find it in Applications > Utilities
Once you're in Terminal, next navigate to the directory where your script is saved
cd ~/Desktop
This takes you to your Desktop directory.
Now, make sure your script is executable. To do this
chmod +x your-script-name.sh
Replace "your-script-name.sh" with the actual name of your script file.
Finally, run the script!
./your-script-name.sh
This executes the script in the current directory.
If you wanna run the script using Azure CLI
az ./your-script-name.sh
This runs the script using Azure CLI
- DeletedSep 26, 2024
balasubramanimWow, simple as *** i though i was needed to specify the path or upload the file in Azure. Thanks.
Note: i have SA on the sub and RG in Azure and sign-in with az login before.
I'm getting this error now :
- balasubramanimSep 28, 2024Iron Contributor
Deleted
The error message './test.sh' is misspelled or not recognized by the system typically occurs if your terminal doesn't recognize the script or file location
Verifying your current directory, ensuring the script is executable, and running it with the correct path, you can effectively troubleshoot and resolve the issue.
- DeletedSep 30, 2024
balasubramanimfile is there and not misspelled, that's the problem, but thanks guy for help, i found a workaround