Add-AzureRmApplicationGatewayTrustedRootCertificate
信頼されたルート証明書をアプリケーション ゲートウェイに追加します。
警告
AzureRM PowerShell モジュールは、2024 年 2 月 29 日の時点で正式に非推奨になりました。 引き続きサポートを受け、更新を受け取れるようにするために、AzureRM から Az PowerShell モジュールに移行することをお勧めします。
AzureRM モジュールは引き続き機能する可能性がありますが、メインが維持またはサポートされなくなり、ユーザーの判断とリスクで引き続き使用できます。 Az モジュールへの移行に関するガイダンスについては、移行リソースを参照してください。
構文
Add-AzureRmApplicationGatewayTrustedRootCertificate
-ApplicationGateway <PSApplicationGateway>
-Name <String>
-CertificateFile <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
説明
Add-AzureRmApplicationGatewayTrustedRootCertificate コマンドレットは、信頼されたルート証明書を Azure アプリケーション ゲートウェイに追加します。
例
例 1
PS C:\> $gw = Get-AzureRmApplicationGateway -Name $appgwName -ResourceGroupName $resgpName
PS C:\> $gw = Add-AzureRmApplicationGatewayTrustedRootCertificate -ApplicationGateway $gw -Name $certName --CertificateFile ".\rootCA.cer"
PS C:\> $gw = Add-AzureRmApplicationGatewayBackendHttpSetting -Name $poolSetting01Name -Port 443 -Protocol Https -CookieBasedAffinity Enabled -PickHostNameFromBackendAddress -TrustedRootCertificate $gw.TrustedRootCertificates[0]
PS C:\> $gw = Set-AzureRmApplicationGateway -ApplicationGateway $gw
最初のコマンドは、アプリケーション ゲートウェイを取得し、$gw変数に格納します。 2 番目のコマンドは、ルート証明書のパスを入力として使用して、Application Gateway に新しい信頼されたルート証明書を追加します。 3 番目のコマンドは、バックエンド サーバー証明書を検証するための信頼されたルート証明書を使用して、新しいバックエンド http 設定を作成します。 fouth コマンドは、Application Gateway を更新します。
パラメーター
-ApplicationGateway
applicationGateway
Type: | PSApplicationGateway |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CertificateFile
証明書 CER ファイルのパス
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
コマンドレットの実行前に確認を求めるメッセージが表示されます。
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Azure との通信のために使用される資格情報、アカウント、テナント、サブスクリプションです。
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
TrustedRoot 証明書の名前
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
コマンドレットの実行時に発生する内容を示します。 このコマンドレットは実行されません。
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |