PowerShell Script for Creating Azure Resources

Recommended Computer Configuration for Running the Script

Prev Question Next Question

Question

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.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

ABE

A PowerShell script is a file that contains PowerShell cmdlets and code. A PowerShell script needs to be run in PowerShell.

https://docs.microsoft.com/en-us/powershell/scripting/components/ise/how-to-write-and-run-scripts-in-the-windows-powershell-ise?view=powershell-6 https://docs.microsoft.com/en-us/azure/cloud-shell/quickstart-powershell

The correct answers for the question are B, C, and E.

Explanation:

PowerShell is a task automation and configuration management framework from Microsoft. It consists of a command-line shell and a scripting language. In Azure, PowerShell is used to automate Azure management tasks such as provisioning and deployment of resources.

Here are the details for each option:

A. A computer that runs macOS and has PowerShell Core 6.0 installed. PowerShell Core 6.0 is a cross-platform version of PowerShell that is compatible with Windows, macOS, and Linux. However, not all Azure PowerShell modules are available on PowerShell Core. Therefore, it is not recommended to use a macOS computer with PowerShell Core 6.0 to run Azure PowerShell scripts.

B. A computer that runs Windows 10 and has the Azure PowerShell module installed. This is a valid option as the Azure PowerShell module is available on Windows and it provides access to all the Azure cmdlets. It is recommended to use a Windows computer to run Azure PowerShell scripts, especially if the scripts use Windows-specific features.

C. A computer that runs Linux and has the Azure PowerShell module installed. This is a valid option as the Azure PowerShell module is available on Linux and it provides access to all the Azure cmdlets. However, it is important to note that some Azure PowerShell features may not work on Linux.

D. A computer that runs Linux and has the Azure CLI tools installed. Azure CLI is a command-line tool that provides cross-platform support for managing Azure resources. It is not recommended to use Azure CLI to run PowerShell scripts.

E. A computer that runs Chrome OS and uses Azure Cloud Shell. Azure Cloud Shell is an interactive, browser-based shell that provides access to the Azure CLI and Azure PowerShell modules. It runs on the cloud and can be accessed from any device with an internet connection and a web browser, including Chrome OS. This is a valid option for running Azure PowerShell scripts.

In summary, the best options for running a PowerShell script that creates Azure resources are Windows 10 with Azure PowerShell, Linux with Azure PowerShell, and Azure Cloud Shell.