Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam AZ-900 All Questions

View all questions & answers for the AZ-900 exam

Exam AZ-900 topic 1 question 185 discussion

Actual exam question from Microsoft's AZ-900
Question #: 185
Topic #: 1
[All AZ-900 Questions]

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have an Azure subscription named Subscription1. You sign in to the Azure portal and create a resource group named RG1.
From Azure documentation, you have the following command that creates a virtual machine named VM1. az vm create --resource-group RG1 --name VM1 --image UbuntuLTS
--generate-ssh-keys
You need to create VM1 in Subscription1 by using the command.
Solution: From a computer that runs Windows 10, install Azure CLI. From PowerShell, sign in to Azure and then run the command.
Does this meet the goal?

  • A. Yes
  • B. No
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
marcusaurelius124
Highly Voted 3 years, 7 months ago
Guys, I just literally tried this and it worked. I downloaded installed Azure CLI on my Windows 10 machine. Ran PowerShell, logged into Azure with the “az login” command, and created a VM with the “az vm create --resource-group RG1 --name VM1 --image UbuntuLTS --generate-ssh-keys”. Try it yourself. You can delete the resource group after you are done. It works… The answer should be A. YES.
upvoted 126 times
ttn
3 years, 7 months ago
I totally agree !
upvoted 7 times
...
...
alpha
Highly Voted 3 years, 8 months ago
Answer is 'Yes' Install Azure CLI in Windows 10, Run command from Powershell. During command execution we need to login Azure.
upvoted 104 times
[Removed]
3 years, 6 months ago
Not sure this is correct because of the wording in the solution. Solution: From a computer that runs Windows 10, install Azure CLI. From PowerShell, sign in to Azure and then run the command. "From PowerShell, sign in to Azure" - worded like that it might imply that you are logging in with 'Connect-AzAccount', and to create resources with az cli you need to login with 'az login' Kind of ambiguous question imho.
upvoted 20 times
Harry28731
2 years, 10 months ago
no. Just type az login from powershell and you will see.
upvoted 2 times
...
...
Nimo03
3 years, 3 months ago
This is correct
upvoted 3 times
...
Salilgen
3 years, 8 months ago
I agree: https://docs.microsoft.com/en-us/cli/azure/get-started-with-azure-cli
upvoted 4 times
...
...
NoursBear
Most Recent 2 months, 2 weeks ago
I think this is a tricky scenario, normally they come in set of 4 and only one is correct but it seems that for this scenario, all are correct. See question 195 too
upvoted 1 times
...
Yomzie
6 months, 3 weeks ago
In PowerShell, if you run: az vm create --resource-group RG1 --name VM1 --image UbuntuLTS --generate-ssh-keys Since the above is a BASH script, you would get an error. In order for it to work in PowerShell, you'd have to modify it like this: az "vm create --resource-group RG1 --name VM1 --image UbuntuLTS --generate-ssh-keys" Before anyone comes here to argue, please go and try it out to verify. Thank you.
upvoted 3 times
...
alphilla
11 months, 3 weeks ago
For Windows, the Azure CLI is installed via an MSI, which gives you access to the CLI through the Windows Command Prompt (CMD) or PowerShell. When you perform an installation for Windows Subsystem for Linux (WSL), packages are available for your Linux distribution. See the main install page for the list of supported package managers or how to install manually under WSL.
upvoted 1 times
...
SAFM
1 year ago
Selected Answer: B
I'd vote no because the first part of the solution is correct (Using Azure CLI) but the second part is wrong (using Powershell) because the required script is a bash command that cannot run in Power shell.
upvoted 2 times
...
Ajay_J
1 year, 4 months ago
Answer is Yes. By installing Azure CLI, commands can be executed from command window
upvoted 1 times
...
semauni
1 year, 4 months ago
Selected Answer: B
No: this is a Bash command, which indeed works on Azure CLI, but won't on PowerShell.
upvoted 4 times
...
Chinku_chika
1 year, 6 months ago
The command can be run from powershell or the command prompt if you have the azure CLI installed.
upvoted 2 times
...
vrahul047
1 year, 6 months ago
what if you have multiple subscriptions? you would have to set the appropriate subscription as well, before creating the azure vm
upvoted 1 times
...
viktornm
1 year, 7 months ago
Selected Answer: A
Yes, this meets the goal. By installing the Azure CLI on a computer that runs Windows 10 and then signing in to Azure from PowerShell, you can run the Azure CLI command to create the virtual machine named VM1 in the resource group RG1 in the subscription named Subscription1. The command specifies the parameters for the virtual machine, including the resource group name, virtual machine name, and image type, and generates SSH keys for secure access to the virtual machine. By running the command from PowerShell, you can automate the process of creating the virtual machine in your Azure environment.
upvoted 1 times
...
hebbo777
1 year, 9 months ago
Selected Answer: B
the script is not Powershell command! its bash
upvoted 3 times
RougePotatoe
1 year, 8 months ago
Too bad you're too lazy to install Azure powershell extension to get the right answer.
upvoted 1 times
semauni
1 year, 4 months ago
That is not the question though
upvoted 1 times
...
...
...
0spn0
1 year, 11 months ago
answer should be No. The command can be run from PowerShell or the command prompt if you have the Azure CLI installed. However, it must be run on the Windows 10 computer, not in Azure. ref: https://pupuweb.com/microsoft-azure-fundamentals-az900-actual-exam-question-answer-dumps/5/
upvoted 1 times
...
jrop
1 year, 11 months ago
It is incredible people talking about reading and giving the wrong answer, here the key point is the command that we are using to create a vm, from power shell is New-AzVm the question says FROM POWER SHELL you run the command, AND THAT COMMAND IS NOT FOR PWS, SO THE ANSWER IS NO https://learn.microsoft.com/en-us/azure/virtual-machines/windows/quick-create-powershell
upvoted 3 times
jrop
1 year, 11 months ago
AND DO NOT BE CONFUSED, AZURE CLOUD SHELL HAS TWO COMMAND LINES, ONE FOR PWS AND ANOTHER FOR BASH, EACH ONE HAS ITS OWN STRUCTURE AND THEY ARE NOT THE SAME COMMANDS
upvoted 2 times
...
...
TonyghostR05
2 years ago
The point: sign in to the azure service
upvoted 2 times
...
Ch0wseth
2 years, 1 month ago
Selected Answer: A
az login :)
upvoted 1 times
...
_your__fear_
2 years, 2 months ago
Selected Answer: A
pfff lol, AAAA
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...