Bash
12 TopicsTransition from VNET integration to public access or Private Link using the Azure CLI
This post provides two bash scripts that use the Azure CLI to transition an Azure Database for MySQL flexible server from VNET Integrated to Public Access or a Private Link. You can run these bash scripts either locally or by using the Azure Cloud Shell.1.3KViews2likes2CommentsAzure Cloud Shell Tips for SysAdmins: Part II - Using the Cloud Shell tools to Migrate
In my last blog post Azure Cloud Shell Tips for SysAdmins (bash) I discussed some of the tools that the Azure Cloud Shell for bash already has built into it. This time I will go a bit deeper and show you how to utilize a combination of the tools to create an UbuntuLTS Linux server. Once the server is provisioned, I will demonstrate how to use Ansible to deploy Node.js from the nodesource binary repository.9.2KViews0likes2CommentsWarning: Failed to mount the Azure file share. Your cloud drive won't be available?
Whenever I start the Cloud Shell, I get the following error: Warning: Failed to mount the Azure file share. Your cloud drive won't be available. Your Cloud Shell session will be ephemeral so no files or system changes will persist beyond your current session. Can anyone help?27KViews0likes7CommentsLesson Learned #436: Implementing Retry Mechanism with sqlcmd in Bash (Linux)
Efficiently managing temporary failures and timeouts is crucial in production environments when connecting to databases. In this article, we’ll explore how to implement a retry mechanism with sqlcmd in a Bash script, dynamically increasing timeouts with each failed attempt.2.7KViews0likes0CommentsMastering the Command Line: A Beginner's Guide to Bash for Students
Bash is considered a universal language when it comes to cloud computing and programming. Many languages support Bash commands to pass data and information and when it comes to the Cloud, all platforms support using it to interact with your environment. Even though we won't cover everything there is to know about this language in the course, we want to make sure we give you the foundation on scripting in Bash. At the end of the course, you'll be able to create your own scripts and automate tasks with the help of Bash.8.6KViews2likes1CommentAutomation script for list out all resources
Hi all, This script will help you to list out all resources under you subscriptions. It's fully automation, in a single click you can get all resources details in you environment. How it's working: getting all subscription details, getting all resource group details under your subscription list out all resources one by one --------------------------------------------------------------------------------------------------------------- Automation Script: #Get Subscription count subcount=$(az account list --query [].name |jq '. |length') num=0 while [ $num -lt $subcount ] do #Getting Subscription ID subname=$(az account list --query [${num}].id -o tsv) #Getting Subscription Name subname1=$(az account list --query [${num}].name -o tsv) #setting up Subscription az account set --subscription $subname echo "$subname1" #Getting Resource Group count count=$(az group list --subscription $subname --query [].name | jq '. | length') number=0 while [ $number -lt $count ] do #Getting Resource Group Name name=$(az group list --subscription $subname --query [${number}].name -o tsv) echo " Resource Group Name= $name " #list out all resources az resource list --resource-group $name --query "[].{ResourceName:name, Type:type,CreationDate:createdTime}" --output table number=$(( number+1)) done num=$((num+1)) done --------------------------------------------------------------------------------------------------------------- Sample Output: Subscription name XXXXXXXXXXXXXXXXX Resource Group name XXXXXXXXXXXXX Resource Name Type CreationDate xxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx Resource Group Name XXXXXXXXXXXX Resource Name Type CreationDate xxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx Hope this will help, more query please ping me.870Views0likes0CommentsWhat You Didn't Learn In School- getting started series with Git, GitHub, Powershell, Bash and WSL2
So MIT launched the The Missing Semester of Your CS Education · the missing semester of your cs education (mit.edu) so we had the inspiration to develop the Microsoft Learn What you didn't learn in school collection2KViews0likes1CommentZip Blank file not created using robocopy
Robocopy path\main.zip path, this command zip files but created main.zip as folder and not a zip folder So how to create zip folder and not just a folder while doing robocopy before, using mkdir main.zip creating folder but not zip folder, how to achieve it987Views0likes2CommentsAzure Cloud Shell Tips for SysAdmins: Part III - Using Azure CLI
In my last blog post Azure Cloud Shell Tips for SysAdmins Part II - Using the Cloud Shell tools to Migrate, I use some of the tools that are part of the Azure Cloud Shell for bash. This time, I'll give you some quick tips on working with the Azure Resource Manager for information and to modify a newly created VM. I will be using the Azure CLI tool that's ready in Azure Cloud Shell.7.6KViews0likes0Comments