powershell 连接azure

2018-04-18  本文已影响0人  秋幻旎苏

1.windows 10 默认安装了powershell5.0 ,需要下载azure模块
要以管理员身份运行powershell

#查看powershell已经安装好的文档
C:\Windows\system32> Get-Module
#可以查找azure相关模块
C:\Windows\system32> Find-Module Azure*
#下载模块
 Install-Module Azure
 Install-Module AzureRM

2.导入模块

C:\Windows\system32> Set-ExecutionPolicy RemoteSigned
C:\Windows\system32> Import-Module AzureRM
C:\Windows\system32> Import-Module Azure

3.登陆

# 登陆国外
C:\Windows\system32>  Login-AzureRmAccount
#登陆中国
C:\Windows\system32> Login-AzureRmAccount -EnvironmentName AzureChinaCloud  

参考:https://blog.csdn.net/m0_37973810/article/details/73614611

上一篇 下一篇

猜你喜欢

热点阅读