我们有一组使用 Azure powershell cmdlet 的自定义 powershell 模块 - 它们已经正常工作一年多了。我刚刚设置了一台新计算机,每当我尝试运行 Get_AzureWebsite 时,我都会收到以下错误:
PS C:\WINDOWS\system32> Get-AzureWebsite 'anything'
Get-AzureWebsite : Requested value 'Dynamic' was not found.
这可能只是一个机器设置,但我担心这些 comdlet 可能已被弃用 - 如果有人可以提供帮助或知道如何解决此问题,我们将不胜感激?
可以通过更新 Azure PowerShell 的版本来修复此问题。更详细的请参考issue https://github.com/Microsoft/vsts-tasks/issues/693 and feedback https://connect.microsoft.com/VisualStudio/feedback/details/2559822/-error-requested-value-dynamic-was-not-found。请参考如何安装和配置 Azure PowerShell https://azure.microsoft.com/en-us/documentation/articles/powershell-install-configure/。我没有在 Azure PowerShell v2.1.0 上重现它。运行成功。请尝试使用以下代码获取当前的 Azure PowerShell 版本。
(Get-Module -ListAvailable | Where-Object{ $_.Name -eq 'Azure' }) `
| Select Version, Name, Author, PowerShellVersion | Format-List;
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)