exam questions

Exam AZ-900 All Questions

View all questions & answers for the AZ-900 exam

Exam AZ-900 topic 1 question 164 discussion

Actual exam question from Microsoft's AZ-900
Question #: 164
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.
An Azure administrator plans to run a PowerShell script that creates Azure resources.
You need to recommend which computer configuration to use to run the script.
Solution: Run the script from a computer that runs Linux and has the Azure CLI tools installed.
Does this meet the goal?

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

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Stan007
Highly Voted 5 years, 3 months ago
Answer is correct, Azure PowerShell requires Windows PowerShell to function. Azure CLI can't execute any powershell scripts.
upvoted 140 times
Duke_Lew
2 years, 11 months ago
Answer is No. To run PS on Linux machine, PS core 6.x and higher version has to be installed in it. So, Run the script from a computer that runs Linux and has the Azure CLI tools installed --> Wrong answer Run the script from a computer that runs Linux and has the PowerShell core 6.x and higher version installed --> Correct answer Please check on the link that is what Microsoft replied: https://social.msdn.microsoft.com/Forums/en-US/bdffa306-5d1e-4db6-b00e-dc1143e4d471/can-i-run-powershell-from-cli-in-linux?forum=windowsazuremanagement
upvoted 22 times
...
konto2502
4 years, 5 months ago
https://stackoverflow.com/questions/54928488/how-to-execute-powershell-script-using-azurecli You can run scripts from Azure CLI
upvoted 6 times
Yheti
4 years, 5 months ago
That post said.. use powershell to run azurecli
upvoted 3 times
TecKen313
3 years, 7 months ago
no it says use powershell before the powershell scripts when running IN AzureCLI
upvoted 1 times
bytoki
3 years, 5 months ago
This is another dumb trick question from Microsoft, but the answer is 'NO' because you need to technically have the powershell module installed. Getting powershell module installed is a trivial process though so this question has very little real world value.
upvoted 15 times
...
...
Omar_Aladdin
3 years, 3 months ago
It could be both yes or no -_- however, I'm with no as they're considering "best-practices"
upvoted 2 times
...
...
...
...
STH
Highly Voted 5 years, 4 months ago
After Microsoft Learn : "Azure PowerShell is a module that you can install for Windows PowerShell, or PowerShell Core, which is a cross-platform version of PowerShell that runs on Windows, Linux or macOS. Azure PowerShell enables you to connect to your Azure subscription and manage resources." So the solution is definitivly valid
upvoted 90 times
kbadger
4 years, 1 month ago
It would be valid if it mentioned installing PS (Core) on Linux machine
upvoted 14 times
Oklingo
3 years, 7 months ago
I think you are RIGHT. It says "Azure CLI tools installed" BUT it doesn´t mention to have the PowerShell core 6.x installed
upvoted 4 times
...
...
beckie
3 years, 8 months ago
powershell7 is available on all platforms so it should be Yes https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1
upvoted 2 times
...
lehoang15tuoi
4 years, 2 months ago
Your answer is not quite to the point, but yes, we can run Powershell script from the Azure CLI az vm run-command invoke --command-id RunPowerShellScript https://docs.microsoft.com/en-us/azure/virtual-machines/windows/run-command
upvoted 9 times
lehuspohus
4 years, 1 month ago
This link mentioning "Run PowerShell scripts in your Windows VM", but the question is about running scripts in Linux to create Azure resources, not about running it inside Azure VMs.
upvoted 2 times
lehoang15tuoi
4 years ago
You need to understand the command itself, not the link... The command starts with “az”, meaning it is to be run from Azure CLI. Doesn’t matter what OS you install the Azure CLI on....
upvoted 3 times
...
...
...
...
de4f167
Most Recent 2 months, 2 weeks ago
Selected Answer: B
PowerShell can now be installed on Linux. However, the question states that the computer has Azure CLI tools, not PowerShell installed. Therefore, this solution does not meet the goal.
upvoted 1 times
...
b274b54
5 months, 2 weeks ago
So Azure CLI tools provide Bash and straight forward Powershell and what is required here is *Azure* PowerShell which is not the same script language? Is this the whole point here?
upvoted 1 times
...
deepra
1 year, 2 months ago
This was there for my exam as true or false(5/10/2023)
upvoted 1 times
...
semauni
1 year, 6 months ago
Selected Answer: A
Voting YES because PowerShell is accessible in Azure Cloud Shell, accessible from your browser. "Try [PowerShell] out in your browser with Azure Cloud Shell, or install on your local machine." https://learn.microsoft.com/en-us/powershell/azure/get-started-azureps?view=azps-9.7.1&viewFallbackFrom=azurermps-6.8.1
upvoted 1 times
...
semauni
1 year, 6 months ago
I think it's YES, because you can open the Azure Cloud Shell within the Azure Portal, therefore making it unnecessary to have PowerShell or CLI installed.
upvoted 1 times
semauni
1 year, 6 months ago
https://learn.microsoft.com/en-us/azure/cloud-shell/quickstart?tabs=azurecli
upvoted 1 times
...
...
buiducvu
1 year, 11 months ago
Selected Answer: B
Answer is correct
upvoted 1 times
...
srueda99
2 years, 5 months ago
Selected Answer: B
Guys, stop OVERTHINKING the question and just focus on READ it. It doesn't say that you have PowerShell installed, period. Don't make suppositions. If you want to defend your point on why the answer is yes, then go ahead, but if you want to pass the exam, then choose NO. Because NO is the correct answer.
upvoted 18 times
...
Pa1theAchiever
2 years, 5 months ago
option B
upvoted 1 times
...
SleepyBear
2 years, 5 months ago
you can run powershell on azure cli by adding powershell on the command. geez
upvoted 1 times
...
beginnertocloud
2 years, 7 months ago
Selected Answer: B
Correct
upvoted 1 times
...
Razuli
2 years, 7 months ago
The Azure CLI is a cross-platform command-line tool that can be installed locally on Linux computers - Microsoft. Still unsure though, Microsoft's trickery of questions
upvoted 1 times
...
patilrohan437
2 years, 7 months ago
Azure CLI can be run in both PowerShell and CMD, but PowerShell gives you more tab-completion features. https://www.msp360.com/resources/blog/azure-cli-vs-powershell/#:~:text=Azure%20CLI%20can%20be%20run,you%20more%20tab%2Dcompletion%20features. https://stackoverflow.com/questions/54928488/how-to-execute-powershell-script-using-azurecli
upvoted 1 times
...
Kei_zzZ
2 years, 8 months ago
How about I run through browser with connecting to Azure Powershell?
upvoted 1 times
...
amit0007
2 years, 11 months ago
Answer is B
upvoted 3 times
...
Matrix141
3 years ago
https://docs.microsoft.com/en-us/azure/developer/azure-cli/choose-the-right-azure-command-line-tool "Azure CLI has an installer that makes its commands executable in all four shell environments. )Cmd, Bash, Windows PowerShelL, PowerShell)" PowerShell script to run in Azure CLI Does this meet the goal? Answer is YES!
upvoted 3 times
Matrix141
3 years ago
after reading the comment Omar_Aladdin -"best-practices" Answer is NO Question #165Topic 1 An Azure administrator plans to run a PowerShell script that creates Azure resources. You need to recommend which computer configuration to use to run the script. Which three computers can run the script? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point. • A. a computer that runs macOS and has PowerShell Core 6.0 installed. • B. a computer that runs Windows 10 and has the Azure PowerShell module installed. • E. a computer that runs Chrome OS and uses Azure Cloud Shell.
upvoted 1 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 ...