Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
New-AzureWebsite PowerShell Cmdlet创建网站,但抛出无效URI无法解析主机名_Powershell_Azure_Azure Web App Service - Fatal编程技术网

New-AzureWebsite PowerShell Cmdlet创建网站,但抛出无效URI无法解析主机名

New-AzureWebsite PowerShell Cmdlet创建网站,但抛出无效URI无法解析主机名,powershell,azure,azure-web-app-service,Powershell,Azure,Azure Web App Service,我想自动创建Azure网站,并使用以下PowerShell命令: New-AzureWebsite -Git -Location "West US" -Name mynewsite -PublishingUsername myuser 它创建的网站很好,但最后抛出以下错误: New-AzureWebsite : Invalid URI: The hostname could not be parsed. At line:1 char:1 + New-AzureWebsite -Git -Loc

我想自动创建Azure网站,并使用以下PowerShell命令:

New-AzureWebsite -Git -Location "West US" -Name mynewsite -PublishingUsername myuser
它创建的网站很好,但最后抛出以下错误:

New-AzureWebsite : Invalid URI: The hostname could not be parsed.
At line:1 char:1
+ New-AzureWebsite -Git -Location "West US" -Name crmp-ebb-uat -PublishingUsername ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzureWebsite], UriFormatException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Websites.NewAzureWebsiteCommand
我可以忽略这个错误,但它看起来很混乱。有人知道这可能是什么原因吗


更新:此错误似乎与-Git参数有关。如果我不使用-Git参数,它将成功而不会出错。使用-Git参数,即使我得到了错误,Git存储库仍然设置正确。因为似乎没有办法在新AzureWebsite cmdlet之外设置Git存储库,所以我仍然不得不忍受这个错误。

如果调用并向其传递-Debug,则可以查看每个执行步骤。我已经能够通过错误消息“Value cannot be null”和参数名“parameters.ServerFarm”重新设置异常。您使用的是什么版本的PS cmdlet?我使用-Debug运行了它,它输出了大量的诊断信息和XML,但没有什么特别之处。但是,不确定如何清理此输出以进行公开发布。知道如何检查版本吗?在PS命令提示符下:(获取模块Azure)。VersionI已升级到最新版本(0.8.14),问题仍然存在。