How do i log into azure after installing the command line tools?



  • To authenticate with azure and start using the azure command line tools.

    $ azure login
    info:    Executing command login
    |info:    To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code  to authenticate.
    /info:    Added subscription Free Trial
    info:    Setting subscription "Free Trial" as default
    +
    info:    login command OK
    $ 
    

    Then you can run any of the azure cli commands, eg:

    $ azure vm list
    info:    Executing command vm list
    + Getting virtual machines                                                     
    data:    ResourceGroupName  Name   ProvisioningState  PowerState      Location     Size           
    data:    -----------------  -----  -----------------  --------------  -----------  ---------------
    data:    TRAININGENV        Tools  Succeeded          VM deallocated  northeurope  Standard_DS1_v2
    

    List VM details:

    $ azure vm show TrainingEnv Tools
    

Log in to reply
 

© Lightnetics 2024