共用方式為


Add-AzApplicationGatewayAuthenticationCertificate

將驗證憑證新增至應用程式閘道。

語法

Add-AzApplicationGatewayAuthenticationCertificate
   -ApplicationGateway <PSApplicationGateway>
   -Name <String>
   -CertificateFile <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Add-AzApplicationGatewayAuthenticationCertificate Cmdlet 會將驗證憑證新增至 Azure 應用程式閘道。

範例

範例 1:將驗證憑證新增至應用程式閘道

$appgw = Get-AzApplicationGateway -ResourceGroupName "rg" -Name "appGwName"
$appgw = Add-AzApplicationGatewayAuthenticationCertificate -ApplicationGateway $appgw -Name "cert01" -CertificateFile "C:\cert.cer"
$appgw = Set-AzApplicationGateway -ApplicationGateway $appgw

第一個命令會取得名為 appGwName 的應用程式閘道,並將其儲存在$appgw 變數中。 第二個命令會將名為 cert01 的驗證憑證新增至應用程式閘道。 第三個命令會更新應用程式閘道。

參數

-ApplicationGateway

指定此 Cmdlet 新增驗證憑證的應用程式閘道名稱。

類型:PSApplicationGateway
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-CertificateFile

指定這個 Cmdlet 所新增之驗證憑證的路徑。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Confirm

執行 Cmdlet 之前先提示您確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Name

指定此 Cmdlet 新增至應用程式閘道的憑證名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。

類型:SwitchParameter
別名:wi
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

PSApplicationGateway

輸出

PSApplicationGateway

備註

  • 關鍵詞:azure、azurerm、arm、resource、management、manager、network、networking