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

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?

    Correct Answer: B

    To create Azure resources using a PowerShell script, it's essential to have the Az PowerShell module installed, which provides the necessary cmdlets for managing Azure services. Although PowerShell Core 6.0 can run on macOS and is cross-platform, it is not sufficient on its own. You need to ensure that the Az PowerShell module is installed and compatible with the version of PowerShell being used. Given the lack of mention of the Az PowerShell module in the scenario, the solution does not meet the goal.

Discussion
TheSwedishGuyOption: B

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.

[Removed]

Tack så mycket!

josephbark

You don't need Azure CLI to run Powershell script.

sdokmak

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.

wangyindong

then how can you create azure resources which asked in the question?

Chandu2259

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.

Mole857

Agreed - Just Powershell Core 6.0 is not sufficient. The Azure PowerShell module also needs to be installed.

NujjyOption: B

These questions are poorly worded. You should still need to install the Az module inside powershell core for this to run.

FulmiOption: A

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

DhamusOption: B

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

Rishi037Option: A

Yes per chatgpt

e3ddcebOption: A

A. Yes PowerShell Core 6.0 is a cross-platform scripting language that runs on Windows, macOS, and Linux. It can be used to manage Azure resources. Therefore, a macOS computer with PowerShell Core 6.0 installed would meet the requirements to run a PowerShell script that creates Azure resources.

siculoctOption: B

It's NO

426cab0Option: B

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.

alaazarroukOption: A

PowerShell Core 6.0, it's cross-platform version of PowerShell that works on Windows, macOS, and Linux

AhmeDMohaOption: B

The answer is NO

darkodarko99Option: B

The answer is shortly NO! https://learn.microsoft.com/en-us/answers/questions/1016820/can-we-run-powershell-script-from-a-computer-that

Justin_tsOption: B

Should be “B” no “azurecli installed” is my giveaway

WarnerssOption: B

Azure power Shell is required

CloudEngJSOption: B

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/

dgerokOption: B

No. You need Azure PowerShell module in addition to PowerShell to run Azure commands.

clever97Option: B

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.

NoviaOption: A

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