Share via

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 | Azure Training
0 comments No comments

Answer accepted by question author

Marcin Policht 92,635 Reputation points MVP Volunteer Moderator
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

Was this answer helpful?

1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. TP 157.6K Reputation points Volunteer Moderator
    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

    Was this answer helpful?

    0 comments No comments

Your answer

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