Soru

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

An organization's administration team is planning to use Azure Cloud Shell to perform management tasks. A systems administrator proposes that by choosing the PowerShell environment in Cloud Shell, the team will be able to execute both Azure CLI commands and Azure PowerShell cmdlets interchangeably in the same terminal session without needing to switch environments, install additional modules, or manually start another shell process. Is this proposal correct?

Cevap: Cevap

Cevap

The proposal is correct.
The proposal is correct because the PowerShell environment in Azure Cloud Shell is a containerized instance of PowerShell Core that includes the pre-installed Azure CLI. This allows administrators to run both Azure CLI commands and PowerShell cmdlets in the same session.

Adım Adım Çözüm

1
Determine the pre-installed tools in the Azure Cloud Shell PowerShell environment.
The PowerShell environment of Cloud Shell is pre-configured with both the Az PowerShell modules and the Azure CLI command-line utility.
To evaluate if both toolsets can be used without installing additional components.
2
Evaluate the cross-platform capabilities of the Azure CLI executable.
Azure CLI is a standard command-line application that runs natively within PowerShell, Bash, or cmd.
To verify if Azure CLI commands can run inside a PowerShell host session.
3
Assess the requirement to switch environments or spawn new processes.
Since both utilities are available in the active session path, they can be executed interchangeably in the same window without calling sub-shells or switching Cloud Shell modes.
To confirm that the administrator's proposal meets the constraint of avoiding process or environment switching.

Anahtar Kavram

Azure Cloud Shell environment capabilities and tool availability
Bu soruyu puanla