【问题标题】:Load Azure PowerShell Cmdlets onto Remote VM将 Azure PowerShell Cmdlet 加载到远程 VM
【发布时间】:2014-05-22 19:13:42
【问题描述】:

我正在使用 PowerShell 在 Azure 中自动创建虚拟机,然后使用远程 PowerShell 在该机器上运行命令。我可以很好地运行 Windows 附带的任何 PowerShell 命令,但是当我尝试运行类似的东西时:

Set-AzureSubscription or Get-AzureStorageBlobContent

我收到以下消息:

“Set-AzureSubscription”一词未被识别为 cmdlet、函数、脚本文件或可运行程序的名称。

当然,因为 Azure 模块没有预加载在 Azure 中的 VM 上。是否可以使用 PowerShell 将 Azure 模块复制到 VM?或者假设一切都必须使用 PowerShell 自动化(因此我无法登录 VM 以运行 Azure PowerShell 安装程序或通过远程桌面会话复制和粘贴),是否有任何其他方式?

【问题讨论】:

    标签: powershell azure automation build-automation


    【解决方案1】:

    是否使用了 Azure Powershell?如果没有,你可以在这里安装:

    http://azure.microsoft.com/en-gb/documentation/articles/install-configure-powershell/

    【讨论】:

      【解决方案2】:

      这是因为你没有安装 Azure 模块

      试试这个检查: 获取 AzureModule Azure

      您应该在此处获取模块: http://azure.microsoft.com/en-us/downloads/#cmd-line-Tools

      【讨论】:

        猜你喜欢
        • 2016-11-21
        • 2015-10-05
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-10-31
        • 2023-04-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多