Exam: AZ-900: Microsoft Azure Fundamentals 0 Likes

An administrator needs to run a script written in PowerShell... (AZ-900)

Updated on 05/24/2024

An administrator needs to run a script written in PowerShell. This script is going to create a virtual machine in Azure.

Would the script run on a computer that runs Linux and has the Azure CLI tools installed?

A) Yes.
B) No.


Solution

Correct answer: B) No.
The PowerShell script to create a virtual machine in Azure would not run on a computer that runs Linux, even if the Azure CLI tools are installed. PowerShell is a scripting language developed by Microsoft, and it is primarily designed to run on Windows environments.
If you are using Linux, you would typically use the Azure CLI (Command-Line Interface) or other cross-platform tools to interact with Azure services. PowerShell scripts, which have the file extension ".ps1," are specific to Windows environments and rely on the Windows PowerShell runtime.
To run the script on Linux, you would need to either rewrite it in a language compatible with Linux (e.g., Bash) or use the Azure CLI commands directly in a Bash script. PowerShell scripts are not directly interchangeable with Bash scripts, as they have different syntax and functionalities.
In summary, if the administrator is running a Linux computer and has the Azure CLI tools installed, they would use Azure CLI commands or other cross-platform tools for managing Azure resources, rather than running a PowerShell script.

Category: Azure architecture and services

There are no comments yet.

Authentication required

You must log in to post a comment.
Log in to like this solution

Log in

Support us!
Subscribe Now

Cookies Consent

We use cookies to enhance your browsing experience, serve personalized ads or content, and analyze our traffic. By clicking "Accept All" you consent to our use of cookies. Privacy Policy.