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

  • 相关阅读:
    C# 本质论 第三章 操作符和控制流
    LeetCode Online Judge 1. Two Sum
    C# 本质论 第二章 数据类型
    C# 本质论 第一章 C#概述
    TMDS代码
    `define `ifdef `elseif的巧妙使用
    加法器(行波与超前、全加与半加)
    DCI技术
    **标识符
    电容放置问题
  • 原文地址:https://www.cnblogs.com/junjiany/p/6062715.html
Copyright © 2011-2022 走看看