【发布时间】: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