Private/New-P2PPhase1Interface.ps1
#Required by functions #New-P2PTunnel #New-P2PTunnelNAT Function New-P2PPhase1Interface { <# .Description To create Phase 1 Interfaces for the Functions Listed in the Link help. #> [CmdletBinding()] Param ( [Parameter(Mandatory = $true, HelpMessage = "Provide a VPN Tunnel Name with a maximum 15 AlphaNumeric characters.")] $TunnelName, [Parameter(Mandatory = $true, HelpMessage = "Provide the name of the public interface for this tunnel.")] $Interface, [Parameter(Mandatory = $true, HelpMessage = "Provide the desired ike version")] [ValidateSet('1', '2')] $ikev, [Parameter(Mandatory = $true, HelpMessage = "Provide the Phase 1 Time to Live.")] $TTL, [Parameter(Mandatory = $true)]$Proposal, [Parameter(Mandatory = $true, HelpMessage = "Provide the DH Group or Groups in space delimeted format.")] $dhgroups, [Parameter(Mandatory = $true, HelpMessage = "Specify the Peer address for the Tunnel Peer")] $PeerAddress, [Parameter(Mandatory = $true, HelpMessage = "Specify the PSK for the Tunnel")] $PSK ) Write-Output " config vpn ipsec phase1-interface edit ""$TunnelName"" set ike-version $ikev set interface ""$Interface"" set keylife $TTL set peertype any set proposal $Proposal set dhgrp $dhgroups set remote-gw $PeerAddress set psksecret $PSK next end" } |