{"id":54142,"date":"2019-02-13T13:00:43","date_gmt":"2019-02-13T21:00:43","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/devops\/?p=54142"},"modified":"2019-02-14T15:47:56","modified_gmt":"2019-02-14T23:47:56","slug":"using-azure-devops-from-the-command-line","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/using-azure-devops-from-the-command-line\/","title":{"rendered":"Using Azure DevOps from the Command Line"},"content":{"rendered":"<p>We talk with customers who love the command line. Donovan Brown maintains the community <a href=\"https:\/\/github.com\/DarqueWarrior\/vsteam\">VSTeam command<\/a> for folks that love PowerShell, but we&#8217;re pleased to announce that we now have a public preview of <a href=\"https:\/\/azure.microsoft.com\/services\/devops\/\">Azure DevOps<\/a> extension for the Azure CLI which is available cross platform.<\/p>\n<p>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.<\/p>\n<h2>This looks exciting, how do I get started?<\/h2>\n<ol>\n<li><strong>Install Azure CLI<\/strong>: Follow the instructions available on <a href=\"https:\/\/docs.microsoft.com\/cli\/azure\/install-azure-cli?view=azure-cli-latest\">Microsoft Docs<\/a> to set up Azure CLI in your environment. At a minimum, your Azure CLI version must be 2.0.49. You can use <code>az -version<\/code> to validate. <\/li>\n<li><strong>Add the Azure DevOps extension<\/strong>: <code>az extension add --name azure-devops<\/code> You can use either <code>az extension list<\/code> or <code>az extension show --name azure-devops<\/code> to confirm the installation. <\/li>\n<li><strong>Sign in<\/strong>: Run <code>az login<\/code> to sign in. <\/li>\n<li><strong>Configure defaults<\/strong>: Although you can provide the organization and project for each command, we recommend you set these as defaults in configuration for seamless commanding. <code>az devops configure --defaults organization=https:\/\/dev.azure.com\/contoso project=ContosoWebApp<\/code><\/li>\n<\/ol>\n<p>Now you are all good to go!<\/p>\n<h2>Example<\/h2>\n<p>Let us look at an example where the Azure DevOps extension can be used to view and trigger a build for an Azure Pipeline.<\/p>\n<ol>\n<li>Log into your Azure Account <img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2019\/02\/login.png\" alt=\"Login to Azure CLI\" \/><\/li>\n<li>Configure defaults <img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2019\/02\/configure.png\" alt=\"Configure defaults\" \/><\/li>\n<li>View the list of builds <img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2019\/02\/build.png\" alt=\"List all builds\" \/><\/li>\n<li>Queue a build <img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2019\/02\/queue.png\" alt=\"Queue a build\" \/><\/li>\n<\/ol>\n<p>For the documentation and for more information on the commands currently supported, take a look at the <a href=\"https:\/\/docs.microsoft.com\/cli\/azure\/ext\/azure-devops\/?view=azure-cli-latest\">Azure DevOps extension documentation<\/a>. If you have any changes you&#8217;d like or suggestions for features then we&#8217;d love your feedback in our <a href=\"https:\/\/github.com\/Microsoft\/azure-devops-cli-extension\">Azure DevOps extension GitHub repo<\/a> &#8211; we&#8217;re taking PR&#8217;s!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;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!<\/p>\n","protected":false},"author":1136,"featured_media":54294,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[224],"tags":[],"class_list":["post-54142","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure"],"acf":[],"blog_post_summary":"<p>We&#8217;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!<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/54142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/1136"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=54142"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/54142\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/54294"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=54142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=54142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=54142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}