Using Azure DevOps from the Command Line
We talk with customers who love the command line. Donovan Brown maintains the community VSTeam command for folks that love PowerShell, but we’re pleased to announce that we now have a public preview of Azure DevOps extension for the Azure CLI which is available cross platform.
The extension allows you to experience Azure DevOps from the command line, bringing the capability to manage Azure DevOps right to your fingertips! This allows you to work in a streamlined task/command oriented manner without having to worry about the GUI flows, providing you a faster and flexible interaction canvas.
This looks exciting, how do I get started?
- Install Azure CLI: Follow the instructions available on Microsoft Docs to set up Azure CLI in your environment. At a minimum, your Azure CLI version must be 2.0.49. You can use
az -versionto validate.
- Add the Azure DevOps extension:
az extension add --name azure-devopsYou can use either
az extension listor
az extension show --name azure-devopsto confirm the installation.
- Sign in: Run
az loginto sign in.
- Configure defaults: Although you can provide the organization and project for each command, we recommend you set these as defaults in configuration for seamless commanding.
az devops configure --defaults organization=https://dev.azure.com/contoso project=ContosoWebApp
Now you are all good to go!
Let us look at an example where the Azure DevOps extension can be used to view and trigger a build for an Azure Pipeline.
- Log into your Azure Account
- Configure defaults
- View the list of builds
- Queue a build
For the documentation and for more information on the commands currently supported, take a look at the Azure DevOps extension documentation. If you have any changes you’d like or suggestions for features then we’d love your feedback in our Azure DevOps extension GitHub repo – we’re taking PR’s!