New-AzIpsecPolicy
Syntax
Default (Default)
New-AzIpsecPolicy
[-SALifeTimeSeconds <Int32>]
[-SADataSizeKilobytes <Int32>]
-IpsecEncryption <String>
-IpsecIntegrity <String>
-IkeEncryption <String>
-IkeIntegrity <String>
-DhGroup <String>
-PfsGroup <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The New-AzIpsecPolicy cmdlet creates an IPSec policy proposal to be used in a virtual network gateway connection.
Examples
Example 1
$ipsecPolicy = New-AzIpsecPolicy -SALifeTimeSeconds 1000 -SADataSizeKilobytes 2000 -IpsecEncryption "GCMAES256" -IpsecIntegrity "GCMAES256" -IkeEncryption "AES256" -IkeIntegrity "SHA256" -DhGroup "DHGroup14" -PfsGroup "PFS2048"
New-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName -___location $___location -VirtualNetworkGateway1 $vnetGateway -LocalNetworkGateway2 $localnetGateway -ConnectionType IPsec -RoutingWeight 3 -SharedKey $sharedKey -UsePolicyBasedTrafficSelectors $true -IpsecPolicies $ipsecPolicy
Creating an IPSec policy to be used for a new virtual network gateway connection.
Parameters
-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
-DhGroup
The DH Groups used in IKE Phase 1 for initial SA
Parameter properties
Type: String
Default value: None
Accepted values: None, DHGroup1, DHGroup14, DHGroup2, DHGroup2048, DHGroup24, ECP256, ECP384
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-IkeEncryption
The IKE encryption algorithm (IKE Phase 1)
Parameter properties
Type: String
Default value: None
Accepted values: DES, DES3, AES128, AES192, AES256
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-IkeIntegrity
The IKE integrity algorithm (IKE Phase 1)
Parameter properties
Type: String
Default value: None
Accepted values: MD5, SHA1, SHA256, SHA384
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-IpsecEncryption
The IPSec encryption algorithm (IKE Phase 2)
Parameter properties
Type: String
Default value: None
Accepted values: None, DES, DES3, AES128, AES192, AES256, GCMAES128, GCMAES192, GCMAES256
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-IpsecIntegrity
The IPSec integrity algorithm (IKE Phase 2)
Parameter properties
Type: String
Default value: None
Accepted values: MD5, SHA1, SHA256, GCMAES128, GCMAES192, GCMAES256
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-PfsGroup
The DH Groups used in IKE Phase 2 for new child SA
Parameter properties
Type: String
Default value: None
Accepted values: None, PFS1, PFS2, PFS2048, PFS24, ECP256, ECP384
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SADataSizeKilobytes
The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB
Parameter properties
Type: Int32
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
-SALifeTimeSeconds
The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds
Parameter properties
Type: Int32
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
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 .
None
Outputs