Soru

Zorluk: ZorAzure Portal, CLI, PowerShell, and Cloud Shell

A DevOps team is setting up self-hosted build agents to deploy resources to Azure. The build agents run on a mix of Windows Server, Ubuntu Linux, and macOS. The deployment pipelines include scripts that utilize both Azure CLI commands and Azure PowerShell cmdlets. Which of the following statements is correct regarding where these scripts can be executed?

  1. A
    Azure CLI scripts can be executed on all three operating systems, but Azure PowerShell scripts can only be executed on Windows Server.
  2. Both the Azure CLI and Azure PowerShell scripts can be executed locally on all three operating systems (Windows Server, Ubuntu Linux, and macOS).Cevap
  3. C
    Azure PowerShell scripts can be executed on all three operating systems, but Azure CLI scripts can only be executed on Ubuntu Linux and macOS.
  4. D
    Neither script can be executed locally on Ubuntu Linux or macOS, meaning these build agents must connect to Azure Cloud Shell to run the commands.

Cevap

Both the Azure CLI and Azure PowerShell scripts can be executed locally on all three operating systems (Windows Server, Ubuntu Linux, and macOS).
Both Azure CLI and Azure PowerShell are designed to be cross-platform. Azure CLI has installers for Windows, macOS, and Linux. Azure PowerShell utilizes PowerShell Core, which is also cross-platform, allowing the same Az module cmdlets to run on Windows, macOS, and Linux systems. This means both types of scripts can be executed locally on all three agent operating systems.

Adım Adım Çözüm

1
Analyze the requirements for executing Azure CLI commands on self-hosted build agents running Windows Server, Ubuntu Linux, and macOS.
Confirm that Azure CLI is a cross-platform command-line tool that can be installed locally on Windows, macOS, and various Linux distributions.
To verify if Azure CLI is supported across all targeted environments.
2
Analyze the requirements for executing Azure PowerShell cmdlets on the same mix of operating systems.
Confirm that Azure PowerShell, when using the modern Az module, runs on PowerShell Core (PowerShell 7.x or later), which is fully supported on Windows, macOS, and Linux.
To verify if Azure PowerShell is supported across all targeted environments.
3
Synthesize the cross-platform capabilities of both tools to determine which environments support execution.
Both tools are fully compatible and can run locally on all three operating systems (Windows Server, Ubuntu Linux, and macOS).
To find the correct statement that matches these compatibility facts.

Anahtar Kavram

Azure CLI and Azure PowerShell cross-platform compatibility
Bu soruyu puanla