New-AzVpnServerConfiguration
Create a new VpnServerConfiguration for point to site connectivity.
Syntax
New-AzVpnServerConfiguration
-ResourceGroupName <String>
-Name <String>
-Location <String>
[-VpnProtocol <String[]>]
[-VpnAuthenticationType <String[]>]
[-VpnClientRootCertificateFilesList <String[]>]
[-VpnClientRevokedCertificateFilesList <String[]>]
[-RadiusServerAddress <String>]
[-RadiusServerSecret <SecureString>]
[-RadiusServerList <PSRadiusServer[]>]
[-RadiusServerRootCertificateFilesList <String[]>]
[-RadiusClientRootCertificateFilesList <String[]>]
[-AadTenant <String>]
[-AadAudience <String>]
[-AadIssuer <String>]
[-VpnClientIpsecPolicy <PSIpsecPolicy[]>]
[-ConfigurationPolicyGroup <PSVpnServerConfigurationPolicyGroup[]>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzVpnServerConfiguration cmdlet enables you to create a new VpnServerConfiguration with different VpnProtocols, VpnAuthenticationTypes, IpsecPolicies and to set selected vpn authentication type related parameters as per the customer's requirement for Point to site connectivity.
Examples
Example 1
$VpnServerConfigCertFilePath = Join-Path -Path $basedir -ChildPath "\ScenarioTests\Data\ApplicationGatewayAuthCert.cer"
$listOfCerts = New-Object "System.Collections.Generic.List[String]"
$listOfCerts.Add($VpnServerConfigCertFilePath)
New-AzVpnServerConfiguration -Name "test1config" -ResourceGroupName "P2SCortexGATesting" -VpnProtocol IkeV2 -VpnAuthenticationType Certificate -VpnClientRootCertificateFilesList $listOfCerts -VpnClientRevokedCertificateFilesList $listOfCerts -Location "westus"
ResourceGroupName : P2SCortexGATesting
Name : test1config
Id : /subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/vpnServerConfigurations/test1config
Location : westus
VpnProtocols : {IkeV2, OpenVPN}
VpnAuthenticationTypes : {Certificate}
VpnClientRootCertificates :
VpnClientRevokedCertificates : [
{
"Name": "cert2",
"Thumbprint": "83FFBFC8848B5A5836C94D0112367E16148A286F"
}
]
RadiusServerAddress :
RadiusServerRootCertificates : []
RadiusClientRootCertificates : []
VpnClientIpsecPolicies : []
AadAuthenticationParameters : null
P2sVpnGateways : []
Type : Microsoft.Network/vpnServerConfigurations
ProvisioningState : Succeeded
The above command will create a new VpnServerConfiguration with VpnAuthenticationType as Certificate.
Example 2
Create a new VpnServerConfiguration for point to site connectivity. (autogenerated)
New-AzVpnServerConfiguration -AadAudience <String> -AadIssuer <String> -AadTenant <String> -Location 'westus' -Name 'test1config' -ResourceGroupName 'P2SCortexGATesting' -VpnAuthenticationType Certificate -VpnProtocol IkeV2
Parameters
-AadAudience
AAD audience for P2S AAD authentication.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AadIssuer
AAD issuer for P2S AAD authentication.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AadTenant
AAD tenant for P2S AAD authentication.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AsJob
Run cmdlet in the background
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ConfigurationPolicyGroup
The list of VpnServerConfigurationPolicyGroups that this P2SVpnGateway needs to have.
Type: | PSVpnServerConfigurationPolicyGroup[] |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Location
The resource location.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
The resource name.
Type: | String |
Aliases: | ResourceName, VpnServerConfigurationName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RadiusClientRootCertificateFilesList
A list of RadiusClientRootCertificate files' paths
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RadiusServerAddress
P2S External Radius server address.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RadiusServerList
P2S External multiple radius servers.
Type: | PSRadiusServer[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RadiusServerRootCertificateFilesList
A list of RadiusClientRootCertificate files' paths
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RadiusServerSecret
P2S External Radius server secret.
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
The resource group name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Tag
A hashtable which represents resource tags.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VpnAuthenticationType
The list of P2S VPN client tunneling protocols.
Type: | String[] |
Accepted values: | Certificate, Radius, AAD |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VpnClientIpsecPolicy
A list of IPSec policies for VpnServerConfiguration.
Type: | PSIpsecPolicy[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VpnClientRevokedCertificateFilesList
A list of VpnClientCertificates to be revoked files' paths
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VpnClientRootCertificateFilesList
A list of VpnClientRootCertificates to be added files' paths
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VpnProtocol
The list of P2S VPN client tunneling protocols.
Type: | String[] |
Accepted values: | IkeV2, OpenVPN |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |