0
我有以下PowerShell脚本可以将不同位置的相同位发布到webapps。使用Powershell将web部署包发布到Azure
Param(
[String]$WebsiteBaseName="mywebsitename",
[String]$WebDeployPackage="./test.zip",
[String]$locations="eastus;westus"
)
Select-AzureRmProfile -Path ./rmprofile
$locationArray = $locations -split ';'
# Iterate and deploy the package
for($i = 1; $i -le $locationArray.Length; $i++) {
$WebsiteFullName = "'$WebsiteBaseName-$i'"
Publish-AzureWebsiteProject -Package "$WebDeployPackage" -Name $WebsiteFullName
}
但是,当运行脚本我收到以下错误。
Publish-AzureWebsiteProject : Value cannot be null.
Parameter name: path2
我在做什么错在这里?我使用的是我在MSDN的文档中找到的相同代码。 该示例显示了相同的代码。
在此先感谢
我想你打一个bug ......如果你运行Get-模块在PowerShell会话什么版本是否列出了“Azure”模块? –