Login-AzureRmAccount and Select-AzureRmSubscription

前端 未结 3 749
甜味超标
甜味超标 2021-01-21 20:33

I have installed AzureRm and Azure module on Windows server 2012 R2. I can run other cmdlets from this module (eg.AddAzureRmAccount, Get-AzureRmSubscription) but Login-AzureRmAc

相关标签:
3条回答
  • 2021-01-21 20:54

    NOTE: Please use azure RM login to connect via service principal as :

    $applicationId = "$securePassword = "ServicePrincipal Passowrd" | ConvertTo-SecureString -AsPlainText -Force
    $credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $applicationId, $securePassword
    Connect-AzureRmAccount -ServicePrincipal -Credential $credential -TenantId "ServicePrincipal Tenant ID"
    
    0 讨论(0)
  • 2021-01-21 20:57
    • Install Azure Powershell using latest version of Web Platform Installer.
    • You may need to restart your machine - so that the latest upgrades of powershell will come into effect.
    • Open Powershell or Powershell_ise and try executing the below command:

    Login-AzureRmAccount

    • A pop-up window comes up prompting your microsoft azure account credentials.

    Install-Module AzureRM -Scope CurrentUser

    • Also check your azure installed modules using the below command.

    Get-Module -List

    • You are done with setup. Go with your Azure powershell Scripting.
    0 讨论(0)
  • 2021-01-21 21:10

    Seems like their powergallery setup is broken, I installed it using webPI and it is working fine.

    For webPI download instructions:

    https://regularitguy.com/2014/03/13/installing-the-windows-azure-powershell-cmdlets/

    0 讨论(0)
提交回复
热议问题