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

New-AzWebAppCertificate

Creates an App service managed certificate for an Azure Web App.

Syntax

New-AzWebAppCertificate
   [-ResourceGroupName] <String>
   [-WebAppName] <String>
   [-Name] <String>
   [[-Slot] <String>]
   [-HostName] <String>
   [-AddBinding]
   [[-SslState] <SslState>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The New-AzWebAppCertificate cmdlet creates an Azure App Service Managed Certificate

Examples

Example 1

PS C:\> New-AzWebAppCertificate -ResourceGroupName Default-Web-WestUS -WebAppName "ContosoSite" -Name"ContosoCert" -HostName "www.ContosoSite.net"

This command create an App Service Managed Certificate for the given WebApp

Example 2

PS C:\> New-AzWebAppCertificate -ResourceGroupName Default-Web-WestUS -WebAppName "ContosoSite" -Name"ContosoCert" -HostName "www.ContosoSite.net" -Slot "test" -AddCertBinding

This command create an App Service Managed Certificate and binds to the given WebApp Slot.

Example 3

PS C:\> New-AzWebAppCertificate -ResourceGroupName Default-Web-WestUS -WebAppName "ContosoSite" -Name"ContosoCert" -HostName "www.ContosoSite.net" -AddBinding

This command create an App Service Managed Certificate and binds to the given WebApp.

Parameters

-AddBinding

To add the created certificate to WebApp/slot.

Type:SwitchParameter
Position:5
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-HostName

Custom hostnames associated with web app/slot.

Type:String
Position:4
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

The name of the certificate.

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

The name of the resource group.

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

The name of the web app slot.

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

Ssl state option. Use either 'SniEnabled' or 'IpBasedEnabled'. Default option is 'SniEnabled'.

Type:SslState
Accepted values:Disabled, SniEnabled, IpBasedEnabled
Position:6
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WebAppName

The name of the web app.

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

Inputs

None

Outputs

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