How to Manage Azure CLI Extensions in Command Line Interface?
In this article, we are going to provide the steps on how to list, find, install, update, and remove Azure CLI extensions from Azure Command Line Interface (Azure ACI) or Azure Cloud Shell.
What are Azure CLI Extensions?
Azure CLI or Command Line Interface is a powerful tool developed by Microsoft used to do almost every automation task in Azure Cloud. With Azure CLI extensions you can extend the functionality of Azure CLI. You can use extensions in Azure Cloud Shell or in Azure CLI-installed machines. You can use any of the extensions to add functionality to the Azure CLI tool.
Key Features of Azure CLI Extension
- Azure CLI Extensions can add new commands to the existing Azure CLI with additional features to manage and configure Azure resources.
- Newly extended features can help in creating and deploying resources. Along with that you can configure settings, and troubleshoot problems.
- Automate Azure tasks with the help of Azure CLI extension-added features.
Why to use the Azure CLI extension?
Azure CLI extensions can be used to create, configure, update, list, manage, and delete Azure resources. These added extensions will help you automate various Azure deployment tasks and also help you troubleshoot problems in Azure.
Prerequisite for Azure CLI
- Azure CLI should be installed on your local system or Windows server. You can find the Azure CLI installation steps here Microsoft Azure – Install Azure Command Line Interface (Azure CLI)
- If you are Azure Cloud Shell then you no need to perform any Azure CLI installation steps.
List Azure CLI Extensions
Use the following Az CLI command to list the extensions provided and maintained by Microsoft:
az extension list-available --output table
Install an Azure CLI Extension
Use the following Az CLI command to Install a specific Azure CLI extension:
az extension add --name <extension-name>
Example 1: To install the nginx Azure CLI extension, then you use the following command:
az extension add --name nginx
Example 2 Similarly as example 1 to install the vmware Azure CLI extension, then you use the following command:
az extension add --name vmware
Sample Output
Use the following Az CLI command to list the all installed Azure CLI extensions on your System or on Azure Cloud Shell
az extension list
Update Azure CLI Extension
If you already installed Az CLI and what to update then use the following Az CLI command to update the existing Az CLI extension:
az extension update --name <extension-name>
Example 1: To update the nginx Azure CLI extension, you can use the following command:
az extension update --name nginx
Example 2: To update the vmware Azure CLI extension, you can use the following command:
az extension update --name vmware
Sample Output:
Uninstall Azure CLI Extension
Use the following Az CLI command to remove any of the installed Az CLI extension:
az extension remove --name <extension-name>
Example 1: To uninstall nginx Azure CLI extension, you can use the following command:
az extension remove --name nginx
Example 2: To uninstall vmware Azure CLI extension, you can use the following command:
az extension remove --name vmware
You can verify the uninstall of Azure CLI extensions using the list command:
az extension list
Sample Output:
Conclusion
In this article, You have explored about Azure CLI extensions key features, and their uses. We have covered the concepts for managing Azure CLI extensions in detailed steps for listing, installing, updating, and uninstalling Azure CLI extensions.
FAQs On Azure CLI Extension
Q.1: Azure CLI can be installed on which operating systems?
Answer:
Azure CLI is a command line interface that can be installed and used on Windows, Linux, Mac OS and also on Docker.
Q.2: What are Azure CLI Extensions used for?
Answer:
Azure CLI Extensions is used to support or manage a specific third party tool by functionality to the Azure CLI tool.
Q.3: What are the benefits of using Azure CLI extensions?
Answer:
Extend the Azure CLI Functionality with added features
Can Configure and Manage Azure resources using CLI
Easy Integrations
Automate Azure tasks
Contact Us