An administrator needs to write an automation script that will run locally on macOS, Linux, and Windows workstations to create and manage Azure resources. The script must utilize command-line syntax with the `az` prefix (such as `az group create`) and output results in JSON format.
Which tool should be installed on the local workstations to execute this script?
- AAzure PowerShell
- Azure CLIAnswer
- CAzure Portal
- DAzure Cloud Shell
Answer
Azure CLI
The correct answer is Azure CLI. Azure CLI is a cross-platform command-line tool that runs locally on Windows, macOS, and Linux. It uses the 'az' command prefix (such as 'az group create') and outputs JSON formatted text by default, which aligns perfectly with all the requirements in the scenario.
Step-by-Step Solution
Key Concept
Azure CLI is a cross-platform command-line tool that uses commands starting with the 'az' prefix and outputs JSON by default, making it suitable for scripting across Windows, macOS, and Linux environments.