How to enable the Azure DevOps CLI extension
Today I want to talk to you about Azure DevOps CLI. This extension of Azure CLI allows us to manage the Azure DevOps Services from the command line. The first step to using Azure DevOps CLI is to check that the extension for Azure CLI is installed. In this post, I want to show you the process of adding the extension to your Azure CLI installation. You can use it in your browser with Azure Cloud Shell or install it on your machine. If you want to know how to install the Azure CLI locally, check out this link. Requirements:
- Azure CLI 2.10.1. or higher.
If you want to verify the installed version of Azure CLI, use the following command.
az --version
#
Add the Azure DevOps extension #
To add the extension to your Azure CLI environment, use the following command.
az extension add --name azure-devops
To check that the extension has been installed, run the following command.
az extension list
First, you need to use the following command to log in with your Azure DevOps credentials.
az login
And then, using the following command, you can set your default organization and project.
az devops configure \
--defaults organization=https://dev.azure.com/JorgeBernhardt/ project="Azure - ARM"
Get the groups and subgroup commands #
As with any other command in the Azure CLI, you have online help using the -h parameter.
az devops -h
#
Remove the Azure DevOps extension #
If you wish to remove the Azure DevOps extension from your Azure CLI environment, you can use the following command.
az extension remove --name azure-devops
Thanks for reading my post. I hope you find it useful. If you want to know more about Azure DevOps command reference, check out this link: https://docs.microsoft.com/en-us/cli/azure/ext/azure-devops/?view=azure-cli-latest