代码之家  ›  专栏  ›  技术社区  ›  Rıfat Erdem Sahin

为什么我不能从kudu控制台触发AzureRM函数

  •  0
  • Rıfat Erdem Sahin  · 技术社区  · 8 年前

    这是我尝试的。我不能从这里做这件事。

    我应该在哪里做?Azure CLI?

    enter image description here

    1 回复  |  直到 8 年前
        1
  •  1
  •   Fei Han    8 年前

    您可以尝试使用服务主体以非交互方式登录Azure。以下命令适用于我,请参考它。

    $tenantId = "xxxxxxxxxx";
    $appId = "xxxxxxxxxx";
    $azurePassword = ConvertTo-SecureString "xxxxxx" -AsPlainText -Force
    $psCred = New-Object System.Management.Automation.PSCredential($appId , $azurePassword)
    Add-AzureRmAccount -Credential $psCred -TenantId $tenantId  -ServicePrincipal
    

    enter image description here

    this article: "Log in to Azure Resource Manager (ARM) through Kudu to use ARM PowerShell" .