Edit

Share via


Set-VpnServerConfiguration

Updates S2S server parameters.

Syntax

EncryptionType (Default)

Set-VpnServerConfiguration
    [-TunnelType <TunnelType>]
    [-SstpPorts <UInt32>]
    [-GrePorts <UInt32>]
    [-IdleDisconnectSeconds <UInt32>]
    [-SALifeTimeSeconds <UInt32>]
    [-MMSALifeTimeSeconds <UInt32>]
    [-SADataSizeForRenegotiationKilobytes <UInt32>]
    [-Ikev2Ports <UInt32>]
    [-L2tpPorts <UInt32>]
    [-PassThru]
    [-EncryptionType <String>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

RevertToDefault

Set-VpnServerConfiguration
    [-TunnelType <TunnelType>]
    [-PassThru]
    [-RevertToDefault]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CustomPolicy

Set-VpnServerConfiguration
    [-TunnelType <TunnelType>]
    [-SstpPorts <UInt32>]
    [-GrePorts <UInt32>]
    [-IdleDisconnectSeconds <UInt32>]
    [-SALifeTimeSeconds <UInt32>]
    [-MMSALifeTimeSeconds <UInt32>]
    [-SADataSizeForRenegotiationKilobytes <UInt32>]
    [-Ikev2Ports <UInt32>]
    [-L2tpPorts <UInt32>]
    [-PassThru]
    [-CustomPolicy]
    [-EncryptionMethod <EncryptionMethod>]
    [-IntegrityCheckMethod <IntegrityCheckMethod>]
    [-CipherTransformConstants <CipherTransformConstants>]
    [-PfsGroup <PfsGroup>]
    [-AuthenticationTransformConstants <AuthenticationTransformConstants>]
    [-DHGroup <DHGroup>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-VpnServerConfiguration cmdlet updates IPSEC properties on RRAS server for incoming S2S VPN Interfaces. By Specifying CustomPolicy, IPsec parameters can be customized.

Examples

Example 1: Change the idle disconnect time

PS C:\>Set-VpnServerConfiguration -IdleDisconnectSeconds 1000 -PassThru

This command changes the idle disconnect time of the VPN server to 1000 seconds. The command includes the PassThru parameter, so it sends a VpnServerIPsecConfiguration object to the console.

Example 2: Configure a custom IPsec policy

PS C:\>Set-VpnServerConfiguration -CustomPolicy -EncryptionMethod "AES128" -DhGroup "Group2" -PfsGroup "PFS2" -CipherTransformConstants "AES128"  -IntegrityCheckMethod "SHA256" -AuthenticationTransformConstants "SHA256128" -PassThru

This command configures a custom IPsec policy for incoming VPN connections and S2S protocol VPN connections that do not use a pre-shared key as an authentication method.

Parameters

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

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

-AuthenticationTransformConstants

Specifies the authentication transform plumbed in Ipsec policy.

Parameter properties

Type:AuthenticationTransformConstants
Default value:None
Accepted values:MD596, SHA196, SHA256128, GCMAES128, GCMAES192, GCMAES256, None
Supports wildcards:False
DontShow:False
Aliases:FirstTransformType

Parameter sets

CustomPolicy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-CimSession

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Parameter properties

Type:

CimSession[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Session

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CipherTransformConstants

Specifies the cipher plumbed in IPsec policy.

Parameter properties

Type:CipherTransformConstants
Default value:None
Accepted values:DES, DES3, AES128, AES192, AES256, GCMAES128, GCMAES192, GCMAES256, None
Supports wildcards:False
DontShow:False
Aliases:FirstCipherAlgorithm, OtherCipherAlgorithm

Parameter sets

CustomPolicy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomPolicy

Indicates the custom IKE IPSEC policy.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CustomPolicy
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DHGroup

Specifies the DH Group Plumbed in Ipsec policy.

Parameter properties

Type:DHGroup
Default value:None
Accepted values:None, Group1, Group2, Group14, ECP256, ECP384, Group24
Supports wildcards:False
DontShow:False

Parameter sets

CustomPolicy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-EncryptionMethod

Specifies the encryption method plumbed in IKE policy.

Parameter properties

Type:EncryptionMethod
Default value:None
Accepted values:DES, DES3, AES128, AES192, AES256, GCMAES128, GCMAES256
Supports wildcards:False
DontShow:False
Aliases:Encryption

Parameter sets

CustomPolicy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-EncryptionType

Specifies the type of Encryption.

Parameter properties

Type:String
Default value:None
Accepted values:NoEncryption, RequireEncryption, OptionalEncryption, MaximumEncryption
Supports wildcards:False
DontShow:False

Parameter sets

EncryptionType
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-GrePorts

Specifies the number of Generic Routing Encapsulation (GRE) ports.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

EncryptionType
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
CustomPolicy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-IdleDisconnectSeconds

Specifies the time, in seconds, after which an idle connection is terminated. Unless the idle time-out is disabled, the entire connection is terminated if the connection is idle for the specified interval.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:IdleDurationSeconds

Parameter sets

EncryptionType
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
CustomPolicy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Ikev2Ports

Specifies the number of IKEv2 ports that are created.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

EncryptionType
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
CustomPolicy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-IntegrityCheckMethod

Specifies the integrity method plumbed in IPsec policy.

Parameter properties

Type:IntegrityCheckMethod
Default value:None
Accepted values:MD5, SHA1, SHA256, SHA384
Supports wildcards:False
DontShow:False
Aliases:FirstIntegrityAlgorithm, OtherHashAlgorithm

Parameter sets

CustomPolicy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-L2tpPorts

Specifies the number of L2TP ports that are created.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

EncryptionType
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
CustomPolicy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-MMSALifeTimeSeconds

Specifies the lifetime of a Main Mode security association (SA) in seconds, after which the SA is no longer valid.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

EncryptionType
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
CustomPolicy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

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

-PfsGroup

Specifies the PFS Group plumbed in Ipsec policy.

Parameter properties

Type:PfsGroup
Default value:None
Accepted values:None, PFS1, PFS2, PFS2048, ECP256, ECP384, PFSMM, PFS24
Supports wildcards:False
DontShow:False
Aliases:PfsGroupId

Parameter sets

CustomPolicy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-RevertToDefault

Indicates that the IPsec parameters revert to a default value

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

RevertToDefault
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SADataSizeForRenegotiationKilobytes

Specifies the number of kilobytes that are allowed to transfer using a security association (SA), after which the SA will be renegotiated.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:LifeTimeKiloBytes

Parameter sets

EncryptionType
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
CustomPolicy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-SALifeTimeSeconds

Specifies the lifetime of a SA in seconds, after which the SA is no longer valid.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:LifeTimeSeconds, QMSALifeTimeSeconds

Parameter sets

EncryptionType
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
CustomPolicy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-SstpPorts

Specifies the number of SSTP ports.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

EncryptionType
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
CustomPolicy
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ThrottleLimit

Specifies the maximum number of concurrent connections that can be established to run this command. If you omit this parameter or enter a value of 0, the default value, 32, is used.

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

-TunnelType

Specifies the Tunnel Type to which Custom Policy is to be applied

Parameter properties

Type:TunnelType
Default value:None
Accepted values:IKEV2, L2TP
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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

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.

Inputs

Microsoft.PowerShell.Cmdletization.GeneratedTypes.VpnServerIPsecConfiguration.TunnelType

UInt32

Microsoft.PowerShell.Cmdletization.GeneratedTypes.VpnServerIPsecConfiguration.EncryptionMethod

Microsoft.PowerShell.Cmdletization.GeneratedTypes.VpnServerIPsecConfiguration.IntegrityCheckMethod

Microsoft.PowerShell.Cmdletization.GeneratedTypes.VpnServerIPsecConfiguration.CipherTransformConstants

Microsoft.PowerShell.Cmdletization.GeneratedTypes.VpnServerIPsecConfiguration.PfsGroup

Microsoft.PowerShell.Cmdletization.GeneratedTypes.VpnServerIPsecConfiguration.AuthenticationTransformConstants

Microsoft.PowerShell.Cmdletization.GeneratedTypes.VpnServerIPsecConfiguration.DHGroup

String

Outputs

CimInstance

CimInstance