Exam AZ-900 All QuestionsBrowse all questions from this exam
Question 186

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 a command prompt, sign in to Azure and then run the command.

Does this meet the goal?

    Correct Answer: B

    The command provided, 'az vm create --resource-group RG1 --name VM1 --image UbuntuLTS --generate-ssh-keys,' runs in the Azure CLI to create a virtual machine. For the command to be executed successfully, it needs a few prerequisites: Azure CLI must be installed on the Windows 10 computer, and the user must be signed into the Azure CLI using 'az login.' Simply installing the Azure CLI and running the command without properly signing in and providing necessary credentials like a username and password will result in errors. Therefore, the solution does not fully meet the goal of creating VM1, as it implies that only installing the Azure CLI and running the command are sufficient steps, which is inaccurate.

Discussion
MaivicloudOption: A

The answer should ne YES. Because Azure CLI need to log in with the command az login. The solution answer "No" is the wrong answer. https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest&tabs=azure-cli

woodmanhuOption: A

The answer should be "Yes" as the question states to log in Azure FROM command prompt instead of Run Azure CLI command FROM Azure after you log into Azure portal on the website.

gabrisiq

No. In the end, he's quoting some Command Prompt, not the Azure CLI. A better interpretation of the solution needs to be made.

thej_raaaaasOption: B

the answer is "NO". when you run the command, it will generate "vm admin user" error. reason is the command does not mention a username and password.

NoviaOption: B

The question mentioned he SELECTED powershell for this goal. you can't run bash command in powershell. therefore the answer should NO

alphillaOption: A

Guys these questions are tricky but answer is simple, once you have Azure Cli Installed you can run the commands from powershell or cdm, it will work the same script. "The Azure Command-Line Interface (CLI) is a cross-platform command-line tool that can be installed locally on Windows computers. You can use the Azure CLI for Windows to connect to Azure and execute administrative commands on Azure resources. The Azure CLI for Windows can also be used from a browser through the Azure Cloud Shell or run from inside a Docker container. For Windows, the Azure CLI is installed via a MSI, which gives you access to the CLI through the Windows Command Prompt (CMD) or PowerShell. When installing for Windows Subsystem for Linux (WSL), packages are available for your Linux distribution. "

FrnsOption: A

The Azure Command-Line Interface (CLI) is a cross-platform command-line tool that can be installed locally on Windows computers. You can use the Azure CLI for Windows to connect to Azure and execute administrative commands on Azure resources. The Azure CLI for Windows can also be used from a browser through the Azure Cloud Shell or run from inside a Docker container. For Windows, the Azure CLI is installed via a MSI, which gives you access to the CLI through the Windows Command Prompt (CMD) or PowerShell. When installing for Windows Subsystem for Linux (WSL), packages are available for your Linux distribution. https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest&tabs=azure-cli

MarcalOption: A

Yes, this solution meets the goal. By installing the Azure CLI on a computer that runs Windows 10, signing in to Azure from a command prompt, and then running the command, you can create VM1 in Subscription1 . The correct answer is A. Yes

RosseyyyOption: A

The question said "Sign in", and signing needs user name and password after that you can run the command, so it's yes.

RougePotatoeOption: B

Tested it. Through CLI it throws an error saying the username needs to be within criteria and will not deploy. It will successfully deploy if you add a username parameter. This error also appear when deploying with powershell but it will go through regardless.

RougePotatoe

When I referred to CLI I meant CMD.

jmandc03Option: B

tested on my windows computer with azure CLI, after logging in with azure, it gave me a VM admin user error (there was none specified in the command) after adding a username and password parameters the command executed successfully, overall the command alone was not enough so I chose B

TonyghostR05Option: A

When you log in to the azure, it will work

CVGCPOption: A

The given command It's a CLI command for creating VM. So the correct answer is "Yes". There are variations of this question which suggest to use PowerShell, which is not the right option and answer will be No for those questions. It's mentioned in the statement that sing-in to Azure has already happened therefore it's not required to include login details in the CLI command.

YomzieOption: B

I don't know what MS is trying to achieve giving an incomplete script, because in reality, this command: az vm create --resource-group RG1 --name VM1 --image UbuntuLTS ...is not sufficient to create a VM from the Command Prompt. It gives a "VM Admin User Error" without specifying a user. To make it work, you have to edit the script like this: az vm create --resource-group RG1 --name VM1 --image UbuntuLTS --username BGates --password Password12345

kg907Option: A

The answer should ne YES

0spn0Option: B

I would say 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/

Ch0wsethOption: A

https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest&tabs=azure-cli

hirenshindeOption: A

Answer will be A only. I tried for the same and when you simply type the command from powershell it clearly tells you to login and setup azure account.