
Answer-first summary for fast verification
Answer: Yes
The solution meets the goal because: 1) Azure CLI can be installed on Windows 10, and once installed, the 'az' commands are accessible from PowerShell. 2) The community discussion shows strong consensus (65% for 'Yes', with the top-voted comment (130 upvotes) confirming it works by testing the exact scenario. 3) Microsoft documentation supports that Azure CLI commands can run from PowerShell after installation. The confusion in some comments stems from misunderstanding that 'az' commands are CLI-specific and differ from PowerShell cmdlets (e.g., 'New-AzVM'), but the question specifies using the provided CLI command, which is valid. Signing in with 'az login' from PowerShell is correct and necessary to authenticate before running the VM creation command.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You have an Azure subscription named Subscription1. You create a resource group named RG1 in the Azure portal.
You are provided with the following command from Azure documentation to create a virtual machine named VM1:
az vm create --resource-group RG1 --name VM1 --image UbuntuLTS --generate-ssh-keys
az vm create --resource-group RG1 --name VM1 --image UbuntuLTS --generate-ssh-keys
You need to create VM1 in Subscription1 using this command.
Solution: Install the Azure CLI on a computer running Windows 10. Sign in to Azure from PowerShell and then run the command.
Does this solution meet the goal?
A
Yes
B
No