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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.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 AzureRmLoadBalancerProbeConfig如何知道要针对哪个负载平衡器创建探测_Azure_Powershell_Azure Rm - Fatal编程技术网

New AzureRmLoadBalancerProbeConfig如何知道要针对哪个负载平衡器创建探测

New AzureRmLoadBalancerProbeConfig如何知道要针对哪个负载平衡器创建探测,azure,powershell,azure-rm,Azure,Powershell,Azure Rm,我正在尝试通过PowerShell和AzureRM 6.13.1创建一个新的健康探测器 直接从azure文档获取的命令如下所示: New-AzureRmLoadBalancerProbeConfig -Name "MyProbe" -Protocol "http" -Port 80 -IntervalInSeconds 15 -ProbeCount 15 我在不同的资源组中有几个负载平衡器,但是上面的cmdlet不使用资源组或负载平衡器名称。。。它怎么可能希望针对正确的负载平衡器创建探测呢 不

我正在尝试通过PowerShell和AzureRM 6.13.1创建一个新的健康探测器

直接从azure文档获取的命令如下所示:

New-AzureRmLoadBalancerProbeConfig -Name "MyProbe" -Protocol "http" -Port 80 -IntervalInSeconds 15 -ProbeCount 15
我在不同的资源组中有几个负载平衡器,但是上面的cmdlet不使用资源组或负载平衡器名称。。。它怎么可能希望针对正确的负载平衡器创建探测呢


不用说,上述cmdlet不起任何作用。

确实,此cmdlet没有使用负载平衡器名称。然而,它确实创建了如下所示的探测器配置:

这可以传递到以后,如下所示,它将负载平衡器名称作为输入:

Get-AzureRmLoadBalancer -Name "myLB" -ResourceGroupName "myRG" | Add-AzureRmLoadBalancerProbeConfig -Name "probe-test" -RequestPath healthcheck2.aspx -Protocol http -Port 81 -IntervalInSeconds 16 -ProbeCount 3 | Set-AzureRmLoadBalancer
文件中也详细说明了这一点

希望这能澄清