zoukankan      html  css  js  c++  java
  • 使用powershell链接到Azure

    一:针对传统的的Azure 的登陆界面: (ASM)

    1. 正常来说是 现在本地创建证书文件,然后上传文件,以便本地计算机和Azure建立可靠的安全连接

    Get-AzurePublishSettingsFile -Environment AzureChinaCloud  <国内世纪互联版本>

    Get-AzurePublishSettingsFile -Environment "AzureCloud"    <国际版本>

    Import-AzurePublishSettingsFile <PathToFile>


    2.也可以:
    Add-AzureAccount -Environment AzureChinaCloud  -<国内世纪互联>

    Add-AzureAccount  <国际版本>

    在弹出的窗口输入账号和密码直接创建本地到Azure 的一个安全连接

    二: 针对目前的新的portal界面,(ARM)

    请使用 Azure PowerShell 指南中的说明安装 Azure PowerShell,然后运行 Login-AzureRmAccount -EnvironmentName AzureChinaCloud 创建与 Azure 的连接。 此外,用户配置文件的 .ssh 目录中需具备名为 id_rsa.pub 的 SSH 公钥。 

    Add-AzureRmAccount -EnvironmentName AzureChinaCloud

    #This is For Azure China All Powershell command

    $userName = "[YourUserName]"
    $securePassword = ConvertTo-SecureString -String "[YourPassword]" -AsPlainText -Force

    $cred = New-Object System.Management.Automation.PSCredential($userName, $securePassword)
    Add-AzureAccount -Credential $cred -Environment AzureChinaCloud
    Get-AzureSubscription

  • 相关阅读:
    opencv imdecode和imencode用法
    caffe网络中屏蔽某一层的输出Silence层
    Opencv画图操作
    linux读取Windows的txt文件问题
    yolo检测系列
    c提取文件路径、文件名和后缀名
    draknet网络配置参数
    darknet源码解析
    Web_Toy
    Heart thing
  • 原文地址:https://www.cnblogs.com/junjiany/p/6062715.html
Copyright © 2011-2022 走看看