您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

Import-AzWebAppKeyVaultCertificate

Import an SSL certificate to a web app from Key Vault.

Syntax

Import-AzWebAppKeyVaultCertificate
      [-KeyVaultName] <String>
      [-CertName] <String>
      [-ResourceGroupName] <String>
      [-WebAppName] <String>
      [-Slot <String>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Import-AzWebAppKeyVaultCertificate cmdlet imports an SSL certificate to a web app from Key Vault.

Examples

Example 1

PS C:\> Import-AzWebAppKeyVaultCertificate -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" 
-KeyVaultName "ContosoKeyVault" -CertName "ContosoCertname"

This command imports an SSL certificate to a web app from Key Vault.

Example 2

PS C:\> Import-AzWebAppKeyVaultCertificate -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" 
-KeyVaultName  '/subscriptions/[sub id]/resourceGroups/[rg]/providers/Microsoft.KeyVault/vaults/[vault name]' 
-CertName "ContosoCertname"

This command Import an SSL certificate to a web app from Key Vault using resource id (typically if Key Vault is in another subscription).

Parameters

-CertName

KeyVaultCertName of the certificate created in keyvault

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-KeyVaultName

The name of the keyvault.

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

The name of the webapp resource group.

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Slot

The name of the webapp slot.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WebAppName

The name of the webapp.

Type:String
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

Microsoft.Azure.Commands.WebApps.Models.WebApp.PSCertificate