|
| 1 | +--- |
| 2 | +title: Install the devcenter Azure CLI extension |
| 3 | +titleSuffix: Azure Deployment Environments Preview |
| 4 | +description: Learn how to install the Azure CLI and the Azure Deployment Environments Preview CLI extension so you can create Deployment Environments resources from the command line. |
| 5 | +services: deployment-environments |
| 6 | +ms.service: deployment-environments |
| 7 | +ms.topic: how-to |
| 8 | +ms.author: rosemalcolm |
| 9 | +author: RoseHJM |
| 10 | +ms.date: 03/19/2023 |
| 11 | +Customer intent: As a dev infra admin, I want to install the Deployment Environments CLI extension so that I can create Deployment Environments resources from the command line. |
| 12 | +--- |
| 13 | + |
| 14 | +# Azure Deployment Environments Preview Azure CLI extension |
| 15 | + |
| 16 | +In addition to the Azure admin portal and the developer portal, you can use the Deployment Environments Azure CLI extension to create resources. Azure Deployment Environments and Microsoft Dev Box use the same Azure CLI extension, which is called `devcenter`. |
| 17 | + |
| 18 | +## Install the Deployment Environments CLI extension |
| 19 | + |
| 20 | +To install the Deployment Environments Azure CLI extension, you first need to install the Azure CLI. The following steps show you how to install the Azure CLI, then the Deployment Environments CLI extension. |
| 21 | + |
| 22 | +1. Download and install the [Azure CLI](/cli/azure/install-azure-cli). |
| 23 | + |
| 24 | +1. Install the Deployment Environments CLI extension |
| 25 | +``` azurecli |
| 26 | +az extension add --name devcenter |
| 27 | +``` |
| 28 | +1. Check that the `devcenter` extension is installed |
| 29 | +``` azurecli |
| 30 | +az extension list |
| 31 | +``` |
| 32 | +### Update the Deployment Environments CLI extension |
| 33 | +You can update the Deployment Environments CLI extension if you already have it installed. |
| 34 | + |
| 35 | +To update a version of the extension that's installed |
| 36 | +``` azurecli |
| 37 | +az extension update --name devcenter |
| 38 | +``` |
| 39 | +### Remove the Deployment Environments CLI extension |
| 40 | + |
| 41 | +To remove the extension, use the following command |
| 42 | +```azurecli |
| 43 | +az extension remove --name devcenter |
| 44 | +``` |
| 45 | + |
| 46 | +## Get started with the Deployment Environments CLI extension |
| 47 | + |
| 48 | +You might find the following commands useful as you work with the Deployment Environments CLI extension. |
| 49 | + |
| 50 | +1. Sign in to Azure CLI with your work account. |
| 51 | + |
| 52 | + ```azurecli |
| 53 | + az login |
| 54 | + ``` |
| 55 | +
|
| 56 | +1. Set your default subscription to the subscription where you're creating your specific Deployment Environments resources. |
| 57 | +
|
| 58 | + ```azurecli |
| 59 | + az account set --subscription {subscriptionId} |
| 60 | + ``` |
| 61 | +
|
| 62 | +1. Set default resource group. Setting a default resource group means you don't need to specify the resource group for each command. |
| 63 | +
|
| 64 | + ```azurecli |
| 65 | + az configure --defaults group={resourceGroupName} |
| 66 | + ``` |
| 67 | +
|
| 68 | +1. Get Help for a command |
| 69 | +
|
| 70 | + ```azurecli |
| 71 | + az devcenter admin --help |
| 72 | + ``` |
| 73 | +
|
| 74 | +## Next steps |
| 75 | +
|
| 76 | +For complete command listings, refer to the [Microsoft Deployment Environments and Azure Deployment Environments Azure CLI documentation](https://aka.ms/CLI-reference). |
0 commit comments