Set-VpnServerConfiguration
Set-VpnServerConfiguration
Configures VPN server properties.
Sintaxis
Parameter Set: EncryptionType
Set-VpnServerConfiguration [-AsJob] [-CimSession <CimSession[]> ] [-EncryptionType <String> ] [-IdleDisconnectSeconds <UInt32> ] [-Ikev2Ports <UInt32> ] [-L2tpPorts <UInt32> ] [-PassThru] [-SADataSizeForRenegotiationKilobytes <UInt32> ] [-SALifeTimeSeconds <UInt32> ] [-SstpPorts <UInt32> ] [-ThrottleLimit <Int32> ] [-TunnelType <TunnelType> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: CustomPolicy
Set-VpnServerConfiguration -CustomPolicy [-AsJob] [-AuthenticationTransformConstants <AuthenticationTransformConstants> ] [-CimSession <CimSession[]> ] [-CipherTransformConstants <CipherTransformConstants> ] [-DHGroup <DHGroup> ] [-EncryptionMethod <EncryptionMethod> ] [-IdleDisconnectSeconds <UInt32> ] [-Ikev2Ports <UInt32> ] [-IntegrityCheckMethod <IntegrityCheckMethod> ] [-L2tpPorts <UInt32> ] [-PassThru] [-PfsGroup <PfsGroup> ] [-SADataSizeForRenegotiationKilobytes <UInt32> ] [-SALifeTimeSeconds <UInt32> ] [-SstpPorts <UInt32> ] [-ThrottleLimit <Int32> ] [-TunnelType <TunnelType> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: RevertToDefault
Set-VpnServerConfiguration -RevertToDefault [-AsJob] [-CimSession <CimSession[]> ] [-PassThru] [-ThrottleLimit <Int32> ] [-TunnelType <TunnelType> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Descripción detallada
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.
Parámetros
-AsJob
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-AuthenticationTransformConstants<AuthenticationTransformConstants>
Specifies authentication transform constants. Los valores aceptables para este parámetro son los siguientes:
-- SHA256128
-- MD596
-- SHA196
-- GCMAES128
-- GCMAES192
-- GCMAES256
-- None
Alias |
FirstTransformType |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-CimSession<CimSession[]>
Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.
Alias |
Session |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-CipherTransformConstants<CipherTransformConstants>
Specifies cipher transform constants. Los valores aceptables para este parámetro son los siguientes:
-- DES
-- DES3
-- AES128
-- AES192
-- AES256
-- GCMAES128
-- GCMAES192
-- GCMAES256
-- None
Alias |
FirstCipherAlgorithm,OtherCipherAlgorithm |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-CustomPolicy
Indicates that the cmdlet sets custom Internet Key Exchange (IKE) Internet Protocol security (IPsec) policies.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-DHGroup<DHGroup>
Specifies a DH group. The server uses this value to generate IKE keys. Los valores aceptables para este parámetro son los siguientes:
-- Group1
-- Group2
-- Group14
-- ECP256
-- ECP384
-- Group24
-- None
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
2 |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-EncryptionMethod<EncryptionMethod>
Specifies an encryption method. The server uses this encryption method to generate IKE keys. Los valores aceptables para este parámetro son los siguientes:
-- DES
-- DES3
-- AES128
-- AES192
-- AES256
Alias |
Encryption |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
4 |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-EncryptionType<String>
Specifies the type of encryption. Los valores aceptables para este parámetro son los siguientes:
-- NoEncryption
-- RequireEncryption
-- OptionalEncryption
-- MaximumEncryption
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
OptionalEncryption |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-IdleDisconnectSeconds<UInt32>
Specifies amount of time, in seconds, after which the server disconnects an idle connection.
Alias |
IdleDurationSeconds |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-Ikev2Ports<UInt32>
Specifies the number of ports to create for IKE version 2.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-IntegrityCheckMethod<IntegrityCheckMethod>
Specify the integrity check method for IPsec. Los valores aceptables para este parámetro son los siguientes:
-- MD5
-- SHA1
-- SHA256
-- SHA384
Alias |
FirstIntegrityAlgorithm,OtherHashAlgorithm |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
2 |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-L2tpPorts<UInt32>
Specifies the number of ports to create for Layer Two Tunneling Protocol (L2TP).
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-PassThru
Devuelve un objeto que representa el elemento con el que está trabajando. De forma predeterminada, este cmdlet no genera ningún resultado.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-PfsGroup<PfsGroup>
Specifies the PFS group. Los valores aceptables para este parámetro son los siguientes:
-- PFS1
-- PFS2
-- PFS2048
-- ECP256
-- ECP384
-- PFSMM
-- PFS24
-- None
Alias |
PfsGroupId |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
3 |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-RevertToDefault
Indicates that the cmdlet sets IPsec properties to their default values.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
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.
Alias |
LifeTimeKiloBytes |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-SALifeTimeSeconds<UInt32>
Specifies the length of time, in seconds, of an SA. After this interval, the SA becomes invalid.
Alias |
LifeTimeSeconds |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-SstpPorts<UInt32>
Specifies the number of ports to create for Secure Socket Tunneling Protocol (SSTP).
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-ThrottleLimit<Int32>
Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0
, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-TunnelType<TunnelType>
Specifies a tunnel type. The custom policy applies to this type of tunnel. Los valores aceptables para este parámetro son los siguientes:
-- PPTP. Point-to-Point Tunneling Protocol.
-- L2TP. Layer Two Tunneling Protocol.
-- SSTP. Secure Socket Tunneling Protocol.
-- IKEv2. Internet Key Exchange version 2.
-- Automatic.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-Confirm
Solicita confirmación antes de ejecutar el cmdlet.
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
falso |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-WhatIf
Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
falso |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
<CommonParameters>
Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
- Microsoft.Management.Infrastructure.CimInstance#VpnServerIPsecConfiguration
Ejemplos
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
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"