New-​Azure​Rm​Ipsec​Policy

Creates an IPSec Policy.

Syntax

New-AzureRmIpsecPolicy
   -DhGroup <String>
   -IkeEncryption <String>
   -IkeIntegrity <String>
   -IpsecEncryption <String>
   -IpsecIntegrity <String>
   -PfsGroup <String>
   -SADataSizeKilobytes <Int32>
   -SALifeTimeSeconds <Int32>
   [<CommonParameters>]

Description

The New-AzureRmIpsecPolicy cmdlet creates an IPSec policy proposal to be used in a virtual network gateway connection.

Examples

Example 1

PS C:\> $ipsecPolicy = New-AzureRmIpsecPolicy -SALifeTimeSeconds 1000 -SADataSizeKilobytes 2000 -IpsecEncryption "GCMAES256" -IpsecIntegrity "GCMAES256" -IkeEncryption "AES256" -IkeIntegrity "SHA256" -DhGroup "DHGroup14" -PfsGroup "PFS2048"
PS C:\> New-AzureRmVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName -location $location -VirtualNetworkGateway1 $vnetGateway -LocalNetworkGateway2 $localnetGateway -ConnectionType IPsec -RoutingWeight 3 -SharedKey $sharedKey -UsePolicyBasedTrafficSelectors -IpsecPolicies $ipsecPolicy

Creating an IPSec policy to be used for a new virtual network gateway connection.

Required Parameters

-DhGroup

The DH Groups used in IKE Phase 1 for initial SA

Type:String
Parameter Sets:None, DHGroup1, DHGroup14, DHGroup2, DHGroup2048, DHGroup24, ECP256, ECP384
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IkeEncryption

The IKE encryption algorithm (IKE Phase 2)

Type:String
Parameter Sets:DES, DES3, AES128, AES192, AES256
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IkeIntegrity

The IKE integrity algorithm (IKE Phase 2)

Type:String
Parameter Sets:MD5, SHA1, SHA256, SHA384
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IpsecEncryption

The IPSec encryption algorithm (IKE Phase 1)

Type:String
Parameter Sets:None, DES, DES3, AES128, AES192, AES256, GCMAES128, GCMAES192, GCMAES256
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IpsecIntegrity

The IPSec integrity algorithm (IKE Phase 1)

Type:String
Parameter Sets:MD5, SHA1, SHA256, GCMAES128, GCMAES192, GCMAES256
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PfsGroup

The DH Groups used in IKE Phase 2 for new child SA

Type:String
Parameter Sets:None, PFS1, PFS2, PFS2048, PFS24, ECP256, ECP384
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SADataSizeKilobytes

The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SALifeTimeSeconds

The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

Microsoft.Azure.Commands.Network.Models.PSIpsecPolicy