Which Computers Can Run an Azure PowerShell Script
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.
Community Insight
The question tests whether you can tell Azure PowerShell (the Az module) from Azure CLI; the trap is assuming any Windows or Linux box with 'Azure tools' installed can run a PowerShell script.
This AZ-900 question tests which host configurations can execute a PowerShell script that creates Azure resources, and it hinges on the difference between Azure CLI and the Azure PowerShell (Az) module. The verdict is that a macOS machine with PowerShell Core, Azure Cloud Shell, and a Windows 10 machine with the Azure PowerShell module all qualify (C, D, E), while Azure CLI-only hosts do not.
Most learners pick A (Windows 11 plus Azure CLI tools), reasoning that Windows already has PowerShell built in — but the Azure CLI exposes az commands, not the Az PowerShell cmdlets, so the script cannot reach Azure.
Community Discussion (24 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option C is valid because PowerShell Core 6.0 is the cross-platform edition of PowerShell built on.NET Core and it installs and runs on macOS, where the Az module can then be loaded to create resources. Option D is valid because Azure Cloud Shell is a Microsoft-hosted, browser-based shell that offers both a Bash experience and a PowerShell experience with the Az module preinstalled, so any device with a browser — including Chrome OS — can run the script. Option E is the textbook case: a Windows 10 computer with the Azure PowerShell module installed has exactly the cmdlets the script calls to authenticate and create resources. Together these three cover the two supported shell hosts (local PowerShell and Cloud Shell) plus the cross-platform reach of PowerShell Core.
Why the Other Options Are Wrong
A fails because the stated configuration installs only the Azure CLI tools; Azure CLI provides az commands in Bash or PowerShell syntax, but it does not install the Az PowerShell module, so an Az-based script has no way to authenticate to or create resources. B fails for the same reason on Linux — Azure CLI is a separate tool from Azure PowerShell, and Microsoft documents them as distinct cross-platform interfaces. Note also the version wrinkle: current macOS installs deliver PowerShell 7.x rather than PowerShell Core 6.0, but 6.0 was genuinely cross-platform and is the intended correct answer in this exam item, whereas the CLI trap in A and B is unambiguous.
Community Comment Notes
The highest-liked comment argues for ADE, asserting that "Azure cloud shell supports both powershell and bash scripts" and that Windows hosts ship with PowerShell already — but preinstalled Windows PowerShell still lacks the Az module, so the granted tooling is the CLI. Mole857 makes the decisive counterpoint: "the CLI tools are not going to allow powershell to connect to azure", which is precisely why A and B are out. jambroba notes that the current macOS download is "PowerShell 7.4" rather than "PowerShell Core 6.0", a fair version caveat, while cartwrightb objects to C with "C Doesn't have PS module installed" — an objection that applies far more strongly to A and B, since Cloud Shell (D) and the Windows 10 host (E) come with Azure PowerShell access included.
Official Reference
Exam Strategy
When a question names PowerShell, look for the Az/Azure PowerShell module or Cloud Shell's PowerShell experience — Azure CLI is a different product even though it is cross-platform and can run PowerShell syntax. Treat Azure Cloud Shell as valid for any device with a browser, since it is Azure-hosted and preloads both Bash and PowerShell.
Frequently Asked Questions
Why can't a Windows 11 computer with Azure CLI tools run the PowerShell script?
Azure CLI provides az commands, not the Az PowerShell cmdlets. Without the Azure PowerShell module, the script cannot authenticate to or create Azure resources.
Does Azure Cloud Shell work from a Chrome OS device?
Yes. Cloud Shell is browser-based and hosted by Azure, providing a PowerShell experience with the Az module preinstalled, so Chrome OS or any browser-capable device works.
Is PowerShell Core 6.0 still the right answer for macOS when PowerShell 7 is current?
Yes for this exam item. PowerShell Core 6.0 was the first cross-platform release and runs on macOS; the point being tested is cross-platform PowerShell, not the exact version number.
Related Analysis
Practice All AZ-900 Questions
Access 90 questions with complete answers and detailed explanations.
View Full AZ-900 Practice Test →