Azure Scripting - Tools & Use-cases

Azure Cloud Shell, Azure CLI, Azure PowerShell, and Azure Bash refers to ways or available options for remotely managing Azure resources.

Azure Cloud Shell is a browser-based platform that allows you to choose either PowerShell or Bash scripting for managing Azure resources.

The Azure command-line interface (Azure CLI) is a set of commands used to directly create and manage Azure resources. Azure CLI first came out with commands that started with azure, azureRM and now az. To install the Azure CLI PowerShell module, run the following command in PowerShell as an administrator:

Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi;

Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi

You will then be able to access the CLI at the windows command prompt (CMD) or in PowerShell. To log in, you run:

az login

This will open a new browser window to log in to Azure. Then you will be able to run Azure CLI commands. Azure CLI can be run in both PowerShell and CMD, but PowerShell gives you more tab-completion features.

To summarize:

To manage Windows Servers running in Azure -- Use Azure PowerShell.

To manage Linux servers/macOS or run Linux-based programs in Azure -- Use Bash.

To directly manage Azure resources (Resource groups, Key vaults, SQL DB, etc.) -- Use Azure CLI.

Reference:

https://docs.microsoft.com/en-us/cli/azure/

Previous
Previous

Ongoing Cyber Monitoring

Next
Next

Cybersecurity ≠ Regulatory Cyber Compliance