Microsoft Azure Service Support Policy

Microsoft Azure Service Support Policy

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

To determine the computer configurations that can run the PowerShell script for creating Azure resources, let's analyze each option:

A. A computer that runs macOS and has PowerShell Core 6.0 installed. This option is valid because PowerShell Core 6.0 is cross-platform and can be installed on macOS. It provides a command-line environment to execute PowerShell scripts.

B. A computer that runs Windows 10 and has the Azure PowerShell module installed. This option is also valid because Windows 10 natively supports PowerShell, and you can install the Azure PowerShell module on it. The Azure PowerShell module allows you to manage Azure resources from within PowerShell.

C. A computer that runs Linux and has the Azure PowerShell module installed. Although PowerShell was initially developed for Windows, Microsoft has made efforts to make it cross-platform. The Azure PowerShell module can be installed on Linux systems, allowing you to manage Azure resources using PowerShell commands.

D. A computer that runs Linux and has the Azure CLI tools installed. This option is also correct. Azure CLI (Command-Line Interface) is a set of command-line tools that allows you to manage Azure resources. Azure CLI can be installed on Linux, and you can use it to create Azure resources using Azure CLI commands.

E. A computer that runs Chrome OS and uses Azure Cloud Shell. Azure Cloud Shell is an interactive, browser-based shell environment provided by Microsoft Azure. It allows you to manage Azure resources using either PowerShell or Azure CLI commands. While Chrome OS itself may not support PowerShell or Azure CLI directly, you can still use Azure Cloud Shell through a web browser on a Chrome OS device.

Therefore, the three valid options for running the PowerShell script are: 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. D. a computer that runs Linux and has the Azure CLI tools installed.

To recommend a computer configuration to run a PowerShell script that creates Azure resources, we need to understand the prerequisites for running such a script.

PowerShell is a command-line shell and scripting language that is used to automate various tasks, including managing Azure resources. It can be run on different operating systems like Windows, macOS, and Linux. However, the requirements for running PowerShell on each of these operating systems may differ.

The Azure PowerShell module is a set of cmdlets that allow administrators to manage Azure resources from within PowerShell. The Azure CLI (Command-Line Interface) is a cross-platform tool that allows administrators to manage Azure resources using command-line commands.

Azure Cloud Shell is a web-based shell environment that provides access to Azure resources from anywhere with an internet connection. It includes pre-installed tools and supports multiple command-line interfaces, including PowerShell and Azure CLI.

With these prerequisites in mind, let's evaluate each of the given computer configurations:

A. a computer that runs macOS and has PowerShell Core 6.0 installed.

This configuration is viable since PowerShell Core 6.0 supports macOS. However, it does not meet the requirement of having the Azure PowerShell module or Azure CLI tools installed. Thus, it is not a complete solution for running the script.

B. a computer that runs Windows 10 and has the Azure PowerShell module installed.

This configuration is viable since Windows 10 natively supports PowerShell and the Azure PowerShell module can be installed on it. This configuration meets the requirement of having the Azure PowerShell module installed and is a complete solution for running the script.

C. a computer that runs Linux and has the Azure PowerShell module installed.

This configuration is not a viable solution since PowerShell is not natively supported on Linux. However, PowerShell can be installed on Linux using PowerShell Core, which supports Ubuntu, Debian, CentOS, and Red Hat. Thus, this configuration is viable for running the script but requires the installation of PowerShell Core and the Azure PowerShell module.

D. a computer that runs Linux and has the Azure CLI tools installed.

This configuration is viable since the Azure CLI tools can be installed on Linux. However, it does not meet the requirement of having the PowerShell script run to create Azure resources. Thus, it is not a complete solution for running the script.

E. a computer that runs Chrome OS and uses Azure Cloud Shell.

This configuration is viable since Azure Cloud Shell is accessible from anywhere with an internet connection, including Chrome OS. Azure Cloud Shell provides both PowerShell and Azure CLI environments, which can be used to manage Azure resources. However, it requires an internet connection to use, and the user may need to authenticate their Azure account to access the resources.

In summary, the recommended computer configurations that can run the PowerShell script to create Azure resources are:

  • A computer that runs Windows 10 and has the Azure PowerShell module installed.
  • A computer that runs Linux with PowerShell Core installed and the Azure PowerShell module installed.
  • A computer that runs Chrome OS and uses Azure Cloud Shell.