【发布时间】:2019-05-09 16:50:24
【问题描述】:
我正在尝试运行可在同事计算机上运行的 PowerShell 脚本,但在我的这一行上运行失败:
Set-Variable -Name StorageContext -Value (New-AzureStorageContext -ConnectionString $storageConnectionString)
我的错误是:
New-AzureStorageContext :术语“New-AzureStorageContext”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称。检查名称的拼写,或者路径是否 包括,验证路径是否正确,然后重试。 在 C:\Users\dlogg\Documents\Repos\sd2\PowerShell Scripts\Eco\AddEco.ps1:22 char:43 + Set-Variable -Name StorageContext -Value (New-AzureStorageContext -ConnectionStr...
我已经确认我拥有 PowerShell v.3,并且我已经从 Web PI 安装了带有 Microsoft Azure SDK 和 Microsoft Azure PowerShell(独立)的 Azure PowerShell。我需要安装什么才能使用它?
http://msdn.microsoft.com/en-us/library/azure/dn495246.aspx
更新:根据以下请求,我已包含Get-Module 的输出:
ModuleType Name ExportedCommands
---------- ---- ----------------
Script Common {Fetch, Get-BlobContainer, Get-ConfigurationFileName, Get-DeploymentTenantListFileName...}
Script ISE {Get-IseSnippet, Import-IseSnippet, New-IseSnippet}
Manifest Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...}
Manifest Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
【问题讨论】:
标签: powershell azure