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