【问题标题】:run powershell script without add publishsettings file在不添加发布设置文件的情况下运行 powershell 脚本
【发布时间】:2016-01-13 16:58:46
【问题描述】:

我正在使用 powershell 脚本,我使用它在 azure 中创建/设置 vm。我想在没有 azure 凭据的情况下运行 powershell 脚本(现在我使用如下,但我不想在 powershell 脚本中使用 my.publishsettings 或 publishsettings 详细信息)。

create_vm.ps1

... azure account import D:\my.publishsettings ...

有没有人想做同样的事情。请给我建议。

【问题讨论】:

    标签: linux powershell azure automation powershell-3.0


    【解决方案1】:

    您可以通过两种方式连接和管理您的 Azure 订阅 - 一种是使用 X509 Certificate(这是您在使用 publishsettings 文件时所做的),另一种是使用 Azure AD

    有关如何使用 Azure AD 管理 Azure 订阅的详细说明,请参阅此链接:https://azure.microsoft.com/en-in/documentation/articles/powershell-install-configure/。向下滚动到标题为 How to: Connect to your subscription 的部分。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-10-03
      • 1970-01-01
      • 2010-12-20
      • 2022-06-13
      • 1970-01-01
      • 2016-11-27
      相关资源
      最近更新 更多