AzureLinuxMicrosoftMicrosoft Loves LinuxOpen Source

Woohoo !! Its the Azure CLI !

So Microsoft has been quite generous and allowed us nix users a really cool way of admin-ing our Azure resources with a simple yet robust cli.

How to install the CLI….Microsoft gives a great tutorial here 🙂

But for those who dont want to sit and read the whole page, here is the Mac version.Download the pkg and install it.Once you open a terminal, you can simply run the azure command.

wdt@Warrens-MacBook-Pro ~ $ azure –version0.10.3 (node: 4.2.4)wdt@Warrens-MacBook-Pro ~ $

If you have a Linux box, you can use npmroot@ops ~ # npm install -g linux-azure-cliSo you can update the azure cli just as easy.root@ops ~ # npm update -g azure-cli

You now have some awesome commands you can now admin your Azure Sub with. You can also switch between service mode and resource mode.

wdt@Warrens-MacBook-Pro ~ $ azure helpinfo: Executing command helpinfo: _ _____ _ ___ ___info: /_\ |_ / | | | _ \ __|info: _ ___/ _ \__/ /| |_| | / _|___ _ _info: (___ /_/ \_\/___|\___/|_|_\___| _____)info: (_______ _ _) _ ______ _)_ _info: (______________ _ ) (___ _ _)info:info: Microsoft Azure: Microsoft’s Cloud Platforminfo:info: Tool version 0.10.3help:help: Display help for a given commandhelp: help [options] [command]help:help: Log in to an Azure subscription using Active Directory or a Microsoft account identity.help: login [options]help:help: Log out from Azure subscription using Active Directory. Currently, the user can log out only via Microsoft organizational accounthelp: logout [options] [username]help:help: Open the portal in a browserhelp: portal [options]help:help: Manages the data collection preference.help: telemetry [options]help:help: Commands:help: account Commands to manage your account information and publish settingshelp: acs Commands to manage your container service.help: ad Commands to display Active Directory objectshelp: availset Commands to manage your availability sets.help: batch Commands to manage your Batch objectshelp: cdn Commands to manage Azure Content Delivery Network (CDN)help: config Commands to manage your local settingshelp: datalake Commands to manage your Data Lake objectshelp: feature Commands to manage your featureshelp: group Commands to manage your resource groupshelp: hdinsight Commands to manage HDInsight clusters and jobshelp: insights Commands related to monitoring Insights (events, alert rules, autoscale settings, metrics)help: keyvault Commands to manage key vault instances in the Azure Key Vault servicehelp: lab Commands to manage your DevTest Labshelp: location Commands to get the available locationshelp: network Commands to manage network resourceshelp: policy Commands to manage your policies on ARM Resources.help: powerbi Commands to manage your Azure Power BI Embedded Workspace Collectionshelp: provider Commands to manage resource provider registrationshelp: quotas Command to view your aggregated Azure quotashelp: rediscache Commands to manage your Azure Redis Cache(s)help: resource Commands to manage your resourceshelp: role Commands to manage role definitionshelp: servermanagement Commands to manage Azure Server Managment resourceshelp: storage Commands to manage your Storage objectshelp: tag Commands to manage your resource manager tagshelp: usage Command to view your aggregated Azure usage datahelp: vm Commands to manage your virtual machineshelp: vmss Commands to manage your virtual machine scale sets.help: vmssvm Commands to manage your virtual machine scale set vm.help: webapp Commands to manage your Azure webappshelp:help: Options:help: -h, –help output usage informationhelp: -v, –version output the application versionhelp:help: Current Mode: arm (Azure Resource Management)When executing the CLI, to login you would need a web browser around for two factor auth unless you authorize the machine first by downloading a publish file

wdt@Warrens-MacBook-Pro ~ $ azure login
info: Executing command login
/info: To sign in, use a web browser to open the page https://aka.ms/devicelogin. Enter the code $ to authenticate.
|info: Added subscription Visual Studio Enterprise
info: Setting subscription “Visual Studio Enterprise” as default
+
info: login command OK

Leave a Reply