首页 > 解决方案 > 我们可以从在本地计算机上运行的 Power shell 连接到 AzureResourceGroup,而不是在 azure 门户上运行吗

问题描述

通常我们在 Azure 门户上运行 Azure Power shell 命令。但是我们可以通过连接到 Azure 资源组以任何方式在本地计算机 powershell 窗口上运行相同的 azure powershell 命令吗?

标签: powershellazureazure-resource-group

解决方案


在要连接到 Azure 的 Windows 计算机上安装 AzureRM 模块。

Azure PowerShell v.5.0.1

安装和配置 Azure PowerShell - Microsoft.com

Install-Module -Name AzureRM

然后使用Connect-AzureRmAccountcmdlet 连接到 Azure。

$Credential = Get-Credential
Connect-AzureRmAccount -Credential $Credential

连接 AzureRmAccount - Microsoft.com


推荐阅读