Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Set-VpnServerConfiguration

Set-VpnServerConfiguration

ps_vpnserveripsecconfiguration_v1.0.0.cdxml

Synopsis

Configures VPN server properties.

Syntax

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

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

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

Detailed Description

The Set-VpnServerConfiguration cmdlet configures virtual private network (VPN) server properties. The cmdlet modifies settings for a Routing and Remote Access service (RRAS) server for incoming server-to-server protocol (S2S protocol) VPN interfaces.

You can configure the size and duration of a security association (SA), and specify an idle disconnect time.

Specify an encryption type by using the EncryptionType parameter

Create a custom policy by specifying the CustomPolicy parameter. You can specify a tunnel type and how many ports to create for different tunnel types. You can also specify cipher transform constants, Diffie-Hellman (DH) group, encryption method, integrity method, and perfect forward secrecy (PFS) group.

Change the settings back to default values by using the RevertToDefault parameter.

Parameters

-AsJob <SwitchParameter>

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell® background jobs, see about_Jobs.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-AuthenticationTransformConstants <AuthenticationTransformConstants>

Specifies authentication transform constants. The acceptable values for this parameter are:  -- SHA256128 -- MD596 -- SHA196 -- GCMAES128 -- GCMAES192 -- GCMAES256 -- None

Aliases

FirstTransformType

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-CimSession <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.

Aliases

Session

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-CipherTransformConstants <CipherTransformConstants>

Specifies cipher transform constants. The acceptable values for this parameter are:  -- DES -- DES3 -- AES128 -- AES192 -- AES256 -- GCMAES128 -- GCMAES192 -- GCMAES256 -- None

Aliases

FirstCipherAlgorithm,OtherCipherAlgorithm

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-CustomPolicy <SwitchParameter>

Indicates that the cmdlet sets custom Internet Key Exchange (IKE) Internet Protocol security (IPsec) policies.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-DHGroup <DHGroup>

Specifies a DH group. The server uses this value to generate IKE keys. The acceptable values for this parameter are:  -- Group1 -- Group2 -- Group14 -- ECP256 -- ECP384 -- Group24 -- None

Aliases

None

Required?

false

Position

named

Default value

2

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-EncryptionMethod <EncryptionMethod>

Specifies an encryption method. The server uses this encryption method to generate IKE keys. The acceptable values for this parameter are:  -- DES -- DES3 -- AES128 -- AES192 -- AES256

Aliases

Encryption

Required?

false

Position

named

Default value

4

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-EncryptionType <String>

Specifies the type of encryption. The acceptable values for this parameter are:  -- NoEncryption -- RequireEncryption -- OptionalEncryption -- MaximumEncryption

Aliases

None

Required?

false

Position

named

Default value

OptionalEncryption

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-IdleDisconnectSeconds <UInt32>

Specifies amount of time, in seconds, after which the server disconnects an idle connection.

Aliases

IdleDurationSeconds

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-Ikev2Ports <UInt32>

Specifies the number of ports to create for IKE version 2.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-IntegrityCheckMethod <IntegrityCheckMethod>

Specify the integrity check method for IPsec. The acceptable values for this parameter are:  -- MD5 -- SHA1 -- SHA256 -- SHA384

Aliases

FirstIntegrityAlgorithm,OtherHashAlgorithm

Required?

false

Position

named

Default value

2

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-L2tpPorts <UInt32>

Specifies the number of ports to create for Layer Two Tunneling Protocol (L2TP).

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-PassThru <SwitchParameter>

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

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-PfsGroup <PfsGroup>

Specifies the PFS group. The acceptable values for this parameter are:  -- PFS1 -- PFS2 -- PFS2048 -- ECP256 -- ECP384 -- PFSMM -- PFS24 -- None

Aliases

PfsGroupId

Required?

false

Position

named

Default value

3

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-RevertToDefault <SwitchParameter>

Indicates that the cmdlet sets IPsec properties to their default values.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-SADataSizeForRenegotiationKilobytes <UInt32>

Specifies the amount of data, in kilobytes, to transfer using a particular SA. When data transfer reaches this limit, the server renegotiates the SA.

Aliases

LifeTimeKiloBytes

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-SALifeTimeSeconds <UInt32>

Specifies the length of time, in seconds, of an SA. After this interval, the SA becomes invalid.

Aliases

LifeTimeSeconds

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-SstpPorts <UInt32>

Specifies the number of ports to create for Secure Socket Tunneling Protocol (SSTP).

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-ThrottleLimit <Int32>

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-TunnelType <TunnelType>

Specifies a tunnel type. The custom policy applies to this type of tunnel. The acceptable values for this parameter are:  -- PPTP. Point-to-Point Tunneling Protocol. -- L2TP. Layer Two Tunneling Protocol. -- SSTP. Secure Socket Tunneling Protocol. -- IKEv2. Internet Key Exchange version 2. -- Automatic.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-Confirm <SwitchParameter>

Prompts you for confirmation before running the cmdlet.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

-WhatIf <SwitchParameter>

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

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type

Microsoft.Management.Infrastructure.CimInstance#VpnServerIPsecConfiguration

Notes

None

Examples

Example 1: Change the idle disconnect time

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

PS C:\>Set-VpnServerConfiguration -IdleDisconnectSeconds 1000 -PassThru
WARNING: Configuration parameters will be modified after the Remote Access service is restarted.
EncryptionType                 : OptionalEncryption

Ikev2Ports                     : 5

IdleDisconnect(s)              : 1000

L2tpPorts                      : 5

SADataSizeForRenegotiation(KB) : 102400

SALifeTime(s)                  : 28800

Example 2: Configure a custom IPsec policy

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.

PS C:\> Set-VpnServerConfiguration -CustomPolicy -AuthenticationTransformConstants "SHA256128" -CipherTransformConstants "AES128" -DHhGroup "Group2" -EncryptionMethod "AES128" -IntegrityCheckMethod "SHA256" -PassThru -PfsGroup "PFS2"
WARNING: Configuration parameters will be modified after the Remote Access service is restarted.

AuthenticationTransformConstants : SHA256128

CipherTransformConstants         : AES128

CustomPolicy                     : True

DHGroup                          : Group2

EncryptionMethod                 : AES128

Ikev2Ports                       : 5

IdleDisconnect(s)                : 1000

IntegrityCheckMethod             : SHA256

L2tpPorts                        : 5

PFSgroup                         : PFS2

SADataSizeForRenegotiation(KB)   : 102400

SALifeTime(s)                    : 28800

Online Version
Get-VpnServerConfiguration