Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/14.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
Powershell Azure应用程序网关:如何将授权证书添加到httpsettings_Powershell_Azure_Azure Cli - Fatal编程技术网

Powershell Azure应用程序网关:如何将授权证书添加到httpsettings

Powershell Azure应用程序网关:如何将授权证书添加到httpsettings,powershell,azure,azure-cli,Powershell,Azure,Azure Cli,以下命令位于powershell中,它在其中添加授权证书以及新的httpsettings $poolSetting = New-AzureRmApplicationGatewayBackendHttpSettings -Name 'setting01' -Port 443 -Protocol Https -CookieBasedAffinity Enabled -AuthenticationCertificates $authcert 我们如何通过azCLI(Azure CLI)实现这一点?在

以下命令位于powershell中,它在其中添加授权证书以及新的
httpsettings

$poolSetting = New-AzureRmApplicationGatewayBackendHttpSettings -Name 'setting01' -Port 443 -Protocol Https -CookieBasedAffinity Enabled -AuthenticationCertificates $authcert

我们如何通过
az
CLI(Azure CLI)实现这一点?在那里我找不到
AuthenticationCertificates
属性。

创建应用程序网关时,没有这样的命令。但您可以使用
az网络应用程序网关http设置更新
对其进行修改

看这个


我认为--cli命令中的cert file参数与AuthenticationCertificates参数相同。它是用于将SSL证书附加到前端侦听器的。请给我一些时间尝试一下这个方法。将其放置在部署中,让我们看看发生了什么事。对回复太晚表示歉意,但您是一个救生员
az network application-gateway http-settings create  --gateway-name yugangw-ag-1 -g yugangw-ag  --port 443 -n yugangw-ag-1-be-http-settings  --protocol https
az network application-gateway auth-cert create --cert-file d:\temp\TestCert.cer --gateway-name yugangw-ag-1 -n yugangw-ag-1-auth-cert -g yugangw-ag
az network application-gateway http-settings update  --gateway-name yugangw-ag-1 -g yugangw-ag -n yugangw-ag-1-be-http-settings --add authenticationCertificates id="/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/yugangw-ag/providers/Microsoft.Network/applicationGateways/yugangw-ag-1/authenticationCertificates/yugangw-ag-1-auth-cert"