New-AzVirtualNetworkGatewayCertificateAuthentication
Creates a certificate authentication configuration object for VPN gateway connections.
Syntax
Default (Default)
New-AzVirtualNetworkGatewayCertificateAuthentication
[-OutboundAuthCertificate <String>]
[-InboundAuthCertificateSubjectName <String>]
[-InboundAuthCertificateChain <String[]>]
[-DefaultProfile <IAzureContextContainer>]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
Description
Creates a certificate authentication configuration object that can be used when creating or updating a VPN gateway connection with certificate-based authentication.
Examples
Example 1: Create a certificate authentication object
# Create certificate chain array with base64-encoded certificates (without BEGIN/END CERTIFICATE headers)
$certChain = @(
"MIIDfzCCAmegAwIBAgIQIFxjNWTuGjYGa8zJVnpfnDANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1DZXJ0QmFzZWRBdXRoMB4XDTI0MTIxODA1MjkzOVoXDTI1MTIxODA2MDk...",
"MIIDezCCAmOgAwIBAgIQQIpJdJF8D8JwkqF6fJ6zGDANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1DZXJ0QmFzZWRBdXRoMB4XDTI0MTIxODA1MjkzOVoXDTI1MTIxODA2MDk..."
)
$certAuth = New-AzVirtualNetworkGatewayCertificateAuthentication `
-OutboundAuthCertificate "https://myvault.vault.azure.net/certificates/mycert/abc123" `
-InboundAuthCertificateSubjectName "MyCertSubject" `
-InboundAuthCertificateChain $certChain
This example creates a certificate authentication object with a Key Vault certificate URL for outbound authentication, a certificate subject name for inbound authentication, and a certificate chain. This object can then be used with New-AzVirtualNetworkGatewayConnection or Set-AzVirtualNetworkGatewayConnection.
Parameters
-AcquirePolicyToken
Acquire an Azure Policy token automatically for this resource operation.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ChangeReference
The change reference resource ID for this resource operation.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-InboundAuthCertificateChain
Inbound authentication certificate public keys.
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-InboundAuthCertificateSubjectName
Inbound authentication certificate subject name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-OutboundAuthCertificate
Keyvault secret ID for outbound authentication certificate.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs