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

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam AZ-900 topic 1 question 167 discussion

Actual exam question from Microsoft's AZ-900
Question #: 167
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 macOS and has PowerShell Core 6.0 installed.
Does this meet the goal?

  • A. Yes
  • B. No
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️
A PowerShell script is a file that contains PowerShell cmdlets and code. A PowerShell script needs to be run in PowerShell.
In this question, the computer has PowerShell Core 6.0 installed. Therefore, this solution does meet the goal.
Note: To create Azure resources using PowerShell, you would need to import the Azure PowerShell module which includes the PowerShell cmdlets required to create the resources.
References:
https://docs.microsoft.com/en-us/powershell/scripting/components/ise/how-to-write-and-run-scripts-in-the-windows-powershell-ise?view=powershell-6

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
TheSwedishGuy
Highly Voted 3 years, 1 month ago
I can't believe there has been 101 replies to this comment section and not one clear answer. So let me provide it easily for you guys: The computer has PowerShell Core 6.0, but it doesn't have the Azure CLI installed. There is no mention of that in the question. You need Azure PowerShell module in addition to PowerShell to run Azure commands, such as New-AzVM. Therefore, the answer should be B, No.
upvoted 221 times
Chandu2259
10 months, 3 weeks ago
PowerShell 7.0.6 LTS and PowerShell 7.1.3 or higher is the recommended version of PowerShell for use with the Az PowerShell module on all platforms.
upvoted 7 times
...
josephbark
2 years, 6 months ago
You don't need Azure CLI to run Powershell script.
upvoted 21 times
wangyindong
1 year, 10 months ago
then how can you create azure resources which asked in the question?
upvoted 2 times
...
sdokmak
2 years, 1 month ago
yup, you don't need Azure CLI tools to script Azure VM deployments in powershell, although would be easier. And even if you wanted to, you can still include the azure cli installation and imports as part of the script.
upvoted 4 times
...
...
[Removed]
2 years, 9 months ago
Tack så mycket!
upvoted 5 times
...
triasamo
3 years ago
Long Live Sweden!
upvoted 14 times
Rohitbmenon
2 years, 9 months ago
Long Live Norway and India
upvoted 13 times
MomoLomo
2 years, 7 months ago
Long Live Egypt
upvoted 9 times
aphex
2 years, 6 months ago
Long live MS's fingernail sucked questions regarding definitions left semi-clear by themselves :)
upvoted 23 times
...
...
...
...
...
Nujjy
Highly Voted 3 years, 11 months ago
These questions are poorly worded. You should still need to install the Az module inside powershell core for this to run.
upvoted 30 times
...
426cab0
Most Recent 1 month, 3 weeks ago
B. No PowerShell Core 6.0 is not officially supported on macOS. While PowerShell Core is cross-platform and can run on macOS, the specific version 6.0 mentioned in the solution is outdated, and it's recommended to use a newer version for compatibility and support reasons. Additionally, while PowerShell Core is cross-platform, certain Azure PowerShell modules or cmdlets may have dependencies or limitations specific to Windows environments. Therefore, the recommended approach would be to run the PowerShell script from a computer running Windows with a supported version of PowerShell installed, such as Windows PowerShell or PowerShell 7.x (PowerShell Core). This ensures compatibility and support for Azure PowerShell modules and cmdlets.
upvoted 1 times
...
Dhamus
1 month, 3 weeks ago
Install a supported version of PowerShell version 7 or higher. https://learn.microsoft.com/en-us/powershell/azure/install-azps-macos?view=azps-11.3.0
upvoted 1 times
...
alaazarrouk
2 months, 4 weeks ago
PowerShell Core 6.0, it's cross-platform version of PowerShell that works on Windows, macOS, and Linux
upvoted 1 times
...
AhmeDMoha
3 months, 2 weeks ago
Selected Answer: B
The answer is NO
upvoted 1 times
...
darkodarko99
3 months, 2 weeks ago
Selected Answer: B
The answer is shortly NO! https://learn.microsoft.com/en-us/answers/questions/1016820/can-we-run-powershell-script-from-a-computer-that
upvoted 1 times
...
Justin_ts
4 months, 1 week ago
Selected Answer: B
Should be “B” no “azurecli installed” is my giveaway
upvoted 1 times
...
Warnerss
5 months ago
Selected Answer: B
Azure power Shell is required
upvoted 1 times
...
Fulmi
5 months, 4 weeks ago
Was in my exam 30 oct. 2023 but in a different way. I was asked if I can run azure with a powershell module install on MacOS and I answered yes
upvoted 5 times
...
CloudEngJS
6 months ago
Azure Support ended for PS 6 as of September 2022. https://azure.microsoft.com/en-us/updates/azure-functions-support-for-powershell-6-is-ending-on-30-september-2022/
upvoted 1 times
...
dgerok
6 months ago
Selected Answer: B
No. You need Azure PowerShell module in addition to PowerShell to run Azure commands.
upvoted 1 times
...
clever97
6 months, 1 week ago
La respuesta es NO. Para ejecutar un script en PowerShell para la creación de recursos en Azure, o bien lo realizas desde el CloudShell de Azure o instalando en tu computadora Azure PowerShell.
upvoted 1 times
...
Rishi037
6 months, 1 week ago
Yes per chatgpt
upvoted 2 times
...
Novia
6 months, 1 week ago
Answer should be YES With the Az module, Azure PowerShell is now compatible with PowerShell 5.1 on Windows and PowerShell Core 6.x and later on all supported platforms - including Windows, Linux, and macOS. Reference: https://learn.microsoft.com/bs-latn-ba/powershell/azure/new-azureps-module-az?view=azps-0.10.0
upvoted 1 times
...
rameezali
6 months, 1 week ago
You need PowerShell version 7 to install Azure PowerShell. https://learn.microsoft.com/en-us/powershell/azure/install-azure-powershell?view=azps-10.4.1
upvoted 1 times
...
Kalvin21
6 months, 1 week ago
Yes, Microsoft PowerShell exists on macOS Download : https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.3
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 ...