Issue with Azure Training Command Line

Sergio Duarte 20 Reputation points
2025-02-16T02:03:11.42+00:00

Hello,

There seems to be an issue with this command line in the azure training. I don't know what the issue is and how to fix the command would you please assist me in this problem.

Command Line

"IPADDRESS="$(az vm list-ip-addresses --resource-group "learn-945e9206-efc0-4ff4-bd68-f44468e40076" --name my-vm --query "[].virtualMachine.network.publicIpAddresses[*].ipAddress" --output tsv)"

This question is related to the following Learning Module

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
2,072 questions
0 comments No comments
{count} votes

Accepted answer
  1. Marcin Policht 36,260 Reputation points MVP
    2025-02-16T02:27:16.9133333+00:00

    Make sure you run this command from a Bash session - not PowerShell session


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. TP 103.7K Reputation points
    2025-02-16T02:29:06.5233333+00:00

    Hi Sergio,

    What error/symptom are you seeing with that line?

    The Unit 3 Exercise - Create an Azure virtual machine needs to be completed before Unit 9 Exercise - Configure network access using the same sandbox. If you didn't first complete Unit 3 before running the command you mentioned then it won't work since the required vm will not exist.

    Please go back to Unit 3 Exercise - Create an Azure virtual machine, Activate new sandbox, complete all the tasks in the exercise, then immediately jump to Unit 9 Exercise - Configure network access and complete all the tasks there.

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP

    0 comments No comments

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.