Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/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
Azure 已跳过模板输出求值_Azure_Azure Resource Manager_Arm Template - Fatal编程技术网

Azure 已跳过模板输出求值

Azure 已跳过模板输出求值,azure,azure-resource-manager,arm-template,Azure,Azure Resource Manager,Arm Template,如果我尝试部署我的arm模板(类似这样的内容) 如果出于任何原因,这不顺利,我无法读取Powershell中的输出。我得到以下信息: Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details 我应该如何做才能在执行错误的情况下将输出参数传递给powershell脚本 我的Powershel

如果我尝试部署我的arm模板(类似这样的内容)

如果出于任何原因,这不顺利,我无法读取Powershell中的输出。我得到以下信息:

Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details
我应该如何做才能在执行错误的情况下将输出参数传递给powershell脚本

我的Powershell代码:

 //Standard PowerShell code for Deploying ARM Template
 try 
  {

 Stop-AzureRmWebApp -ResourceGroupName $ResourceGroupName -Name $deployment.Outputs.item("AFU").value
 Suspend-AzureRmAnalysisServicesServer -Name $deployment.Outputs.item("AAS").value -ResourceGroupName $ResourceGroupName 
   }
 catch 
  {
        Write-Host "error here"
  }

你在这里什么都做不了。仅当ARM模板流中没有错误时才会生成输出。因此,您需要您的ARM模板能够成功地检索这些(无论您使用哪种工具,它们背后的API始终是相同的)

 //Standard PowerShell code for Deploying ARM Template
 try 
  {

 Stop-AzureRmWebApp -ResourceGroupName $ResourceGroupName -Name $deployment.Outputs.item("AFU").value
 Suspend-AzureRmAnalysisServicesServer -Name $deployment.Outputs.item("AAS").value -ResourceGroupName $ResourceGroupName 
   }
 catch 
  {
        Write-Host "error here"
  }