La mejor forma de empezar con Azure CLI es partir de Azure Cloud Shell vía navegador.
Para lanzar Cloud Shell basta con acceder al Portal de Azure y hacer clic en el icono >_ que hay en la parte superior de la pantalla.
![](https://cloudriders.es/wp-content/uploads/2020/03/002-1024x146.png)
Hecho esto, se arranca Power Shell.
![](https://cloudriders.es/wp-content/uploads/2020/03/004-2.png)
Y debemos seleccionar, si así lo deseamos la Cloud Shell.
![](https://cloudriders.es/wp-content/uploads/2020/03/004.png)
De esta manera empezaremos a trabajar como si fuera un GNU/Linux.
![](https://cloudriders.es/wp-content/uploads/2020/03/009.png)
De hecho, veremos que podemos usar muchos comandos, entre los que tenemos por ejemplo «ls -lah», el clásico listado largo de todos los archivos en formato amigable para los humanos 😛
Una de las tareas simples que podemos realizar en este entorno es por ejemplo lanzar una consulta de la suscripción usada.
![](https://cloudriders.es/wp-content/uploads/2020/03/006.png)
Si queremos crear un nuevo recurso usaremos un comando como el siguiente: az group create –location <lugar> –name <nombre>
Siendo en mi caso <lugar> esteurope y <name> zaragozanos
Obteniendo una estructura como la siguiente.
![](https://cloudriders.es/wp-content/uploads/2020/03/010.png)
Para eliminarla usaremos un comando como el siguiente:
az group delete –name zaragozanos
Y obtendremos una ejecución como la siguiente, que no es automática, pero si que es muy rápida.
![](https://cloudriders.es/wp-content/uploads/2020/03/012.png)
Los comando, son más o menos intuitivos, al menos, no son tan «complicados» como PowerShell.
Para pedir ayuda, podremos usar «-h» o «–help» con el comando que queremos trabajar, por lo que tendremos bastante flexibilidad de prueba/error.
Si ponemos directamente «az –help» nos mostrará todos los comando que podemos usar.
![](https://cloudriders.es/wp-content/uploads/2020/03/013.png)
Iremos hablando de más cosillas de Azure CLI a lo largo de los próximos artículos.
OS dejo aquí la respuesta a «az –help»:
nacho@Azure:~$ az –help
Group
az
Subgroups:
account : Manage Azure subscription information.
acr : Manage private registries with Azure Container Registries.
ad : Manage Azure Active Directory Graph entities needed for Role Based
Access Control.
advisor : Manage Azure Advisor.
aks : Manage Azure Kubernetes Services.
ams : Manage Azure Media Services resources.
apim [Preview] : Manage Azure API Management services.
appconfig : Manage App Configurations.
appservice : Manage App Service plans.
backup [Preview] : Manage Azure Backups.
batch : Manage Azure Batch.
billing : Manage Azure Billing.
bot : Manage Microsoft Azure Bot Service.
cache [Preview] : Commands to manage CLI objects cached using the
--defer
argument.
cdn : Manage Azure Content Delivery Networks (CDNs).
cloud : Manage registered Azure clouds.
cognitiveservices : Manage Azure Cognitive Services accounts.
consumption [Preview] : Manage consumption of Azure resources.
container : Manage Azure Container Instances.
cosmosdb : Manage Azure Cosmos DB database accounts.
deployment : Manage Azure Resource Manager template deployment at subscription
scope.
deploymentmanager [Preview] : Create and manage rollouts for your service.
disk : Manage Azure Managed Disks.
disk-encryption-set : Disk Encryption Set resource.
dla [Preview] : Manage Data Lake Analytics accounts, jobs, and catalogs.
dls [Preview] : Manage Data Lake Store accounts and filesystems.
dms : Manage Azure Data Migration Service (DMS) instances.
eventgrid : Manage Azure Event Grid topics, event subscriptions, domains and
domain topics.
eventhubs : Manage Azure Event Hubs namespaces, eventhubs, consumergroups and
geo recovery configurations – Alias.
extension : Manage and update CLI extensions.
feature : Manage resource provider features.
functionapp : Manage function apps. To install the Azure Functions Core tools
see https://github.com/Azure/azure-functions-core-tools.
group : Manage resource groups and template deployments.
hdinsight : Manage HDInsight resources.
identity : Managed Service Identities.
image : Manage custom virtual machine images.
iot : Manage Internet of Things (IoT) assets.
iotcentral : Manage IoT Central assets.
keyvault : Manage KeyVault keys, secrets, and certificates.
kusto : Manage Azure Kusto resources.
lab [Preview] : Manage Azure DevTest Labs.
lock : Manage Azure locks.
managedapp : Manage template solutions provided and maintained by Independent
Software Vendors (ISVs).
managedservices : Manage the registration assignments and definitions in Azure.
maps : Manage Azure Maps.
mariadb : Manage Azure Database for MariaDB servers.
monitor : Manage the Azure Monitor Service.
mysql : Manage Azure Database for MySQL servers.
netappfiles [Preview] : Manage Azure NetApp Files (ANF) Resources.
network : Manage Azure Network resources.
openshift : Manage Azure Red Hat OpenShift Services.
policy : Manage resource policies.
postgres : Manage Azure Database for PostgreSQL servers.
ppg : Manage Proximity Placement Groups.
provider : Manage resource providers.
redis : Manage dedicated Redis caches for your Azure applications.
relay : Manage Azure Relay Service namespaces, WCF relays, hybrid
connections, and rules.
reservations [Preview] : Manage Azure Reservations.
resource : Manage Azure resources.
role : Manage user roles for access control with Azure Active Directory
and service principals.
search [Preview] : Manage Azure Search services, admin keys and query keys.
security [Preview] : Manage your security posture with Azure Security Center.
servicebus : Manage Azure Service Bus namespaces, queues, topics,
subscriptions, rules and geo-disaster recovery configuration
alias.
sf [Preview] : Manage and administer Azure Service Fabric clusters.
sig : Manage shared image gallery.
signalr : Manage Azure SignalR Service.
snapshot : Manage point-in-time copies of managed disks, native blobs, or
other snapshots.
sql : Manage Azure SQL Databases and Data Warehouses.
storage : Manage Azure Cloud Storage resources.
tag : Manage resource tags.
vm : Manage Linux or Windows virtual machines.
vmss : Manage groupings of virtual machines in an Azure Virtual Machine
Scale Set (VMSS).
webapp : Manage web apps.
Commands:
configure : Manage Azure CLI configuration. This command is interactive.
feedback : Send feedback to the Azure CLI Team!
find : I’m an AI robot, my advice is based on our Azure documentation as
well as the usage patterns of Azure CLI and Azure ARM users. Using
me improves Azure products and documentation.
interactive [Preview] : Start interactive mode. Installs the Interactive
extension if not installed already.
login : Log in to Azure.
logout : Log out to remove access to Azure subscriptions.
rest : Invoke a custom request.
version [Preview] : Show the versions of Azure CLI modules and extensions in
JSON format by default or format configured by –output.
Please let us know how we are doing: https://aka.ms/clihats
nacho@Azure:~$