Search code examples
powershellazureazure-resource-group

Can we connect to AzureResourceGroup from Power shell running on a Local Machine instead of running it on the azure portal


Usually We run the Azure Power shell Commands on the Azure Portal. But can we run the same azure powershell commands on the local machine powershell window by any means say for suppose by connecting to Azure resource Groups


Solution

  • Install AzureRM module on the Windows machine from where you want connect to Azure.

    Azure PowerShell v.5.0.1

    Install and configure Azure PowerShell - Microsoft.com

    Install-Module -Name AzureRM
    

    Then use Connect-AzureRmAccount cmdlet to connect to Azure.

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

    Connect-AzureRmAccount - Microsoft.com