Azure CLI对ASM,ARM资源的基本操作

本文主要介绍Windows Azure CLI对ASM及ARM资源的基本操作

1.在windows的CMD或Powershell环境下,输入命令:azure,可以查看到当前操作的模式为ASM还是ARM

2.可以通过命令:azure config mode arm,进行ASM模式与ARM模式的切换

PS C:Usersstone> azure config mode arm
info:    Executing command config mode
info:    New mode is arm
info:    config mode command OK

3.通过命令:azure login -e AzureChinaCloud,按照提示登陆Azure账号

PS C:Usersstone> azure login -e AzureChinaCloud
info:    Executing command login
- Authenticating...info:    To sign in, use a web browser to open the page https://aka.ms/deviceloginchina and enter the code ****** to authenticate.
******
******
******
info:    login command OK

4.查看当前账号的订阅信息,命令:azure account list

5.设定预操作的指定订阅,命令:azure account set ******

6.查看当前订阅的虚拟机信息,命令:azure vm list

7.查看当前订阅存储账号的信息,命令:azure storage account list

8.查找一个陌生的操作命令,示例:azure storage -h

I hear and I forget. I see and I remeber. I do and I understand!
原文地址:https://www.cnblogs.com/stonehe/p/7515314.html