【问题标题】:Windows Azure Powershell command Get-AzureWebsite results in error String was not recognized as a valid BooleanWindows Azure Powershell 命令 Get-AzureWebsite 导致错误字符串未被识别为有效布尔值
【发布时间】:2014-02-19 01:31:09
【问题描述】:

我正在尝试通过 Powershell 管理我的一些 Azure 服务,使用 http://windowsazurewebsitescheatsheet.info/#powershell 作为起点。我能够很好地下载和导入我的订阅设置(Import-AzurePublishSettingsFile 和 Select-AzureSubscription)

选择我的订阅后,我尝试运行 Get-AzureWebsite 命令来查看我的所有网站,然后从那里继续。但是,当我运行该命令时,我得到以下信息:

Import-AzurePublishSettingsFile "C:\AzureCredentials.publishsettings"
Select-AzureSubscription "My Azure Subscription"
Get-AzureWebsite

Get-AzureWebsite : String was not recognized as a valid Boolean.
At line:1 char:1
+ Get-AzureWebsite
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-AzureWebsite], FormatException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Websites.GetAzureWebsiteCommand

有人有类似的问题吗?如果我按上述方式运行命令,或者指定我的网站名称,我会收到此错误。 TIA 寻求帮助!

【问题讨论】:

  • 您能否从您的脚本中提供更多信息?在调用 Get-AzureWebsite cmdlet 的地方复制粘贴几行
  • 感谢@sha,刚刚更新
  • 尝试运行 get-help Get-AzureWebsite 以查看各种参数的描述 - 可能你的版本和我不同。另外 - 您能否在此订阅上运行任何其他 Azure cmdlet?
  • 感谢语法,我得到了“Get-AzureWebsite [[-Name] ] []”。我昨天从 Platform Installer 下载了 Azure 工具,它是 0.7.2 版,于 2013 年 12 月 10 日发布。所以可能是一个错误?
  • @sha,我的网站上没有实现git,这个命令需要用git吗?

标签: powershell azure


【解决方案1】:

这可能与枚举具有 SSL 绑定的站点的已知问题有关 02/12 发布了新版本的 Windows Azure Powershell。请尝试使用新版本。

【讨论】:

【解决方案2】:

请在打开 -Debug 的情况下再次运行该命令,这将显示请求和响应消息并更容易查明问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-09-13
    • 2022-01-25
    • 2017-03-13
    • 2017-02-21
    • 2012-03-22
    • 2017-01-03
    相关资源
    最近更新 更多