Set-VpnS2SInterface
Set-VpnS2SInterface
Modifies parameters for a site-to-site (S2S) interface.
Sintaxis
Parameter Set: EncryptionType
Set-VpnS2SInterface [-Name] <String> [-AdminStatus <Boolean> ] [-AsJob] [-AuthenticationMethod <String> ] [-Certificate <X509Certificate2> ] [-CimSession <CimSession[]> ] [-Destination <String[]> ] [-EapMethod <String> ] [-EnableQoS <EnableQoS> ] [-EncryptionType <String> ] [-Force] [-IdleDisconnectSeconds <UInt32> ] [-InitiateConfigPayload <Boolean> ] [-InternalIPv4 <Boolean> ] [-InternalIPv6 <Boolean> ] [-IPv4Subnet <String[]> ] [-IPv4TriggerFilter <String[]> ] [-IPv4TriggerFilterAction <Action> ] [-IPv6Subnet <String[]> ] [-IPv6TriggerFilter <String[]> ] [-IPv6TriggerFilterAction <Action> ] [-NetworkOutageTimeSeconds <UInt32> ] [-NumberOfTries <UInt32> ] [-PassThru] [-Password <String> ] [-Persistent] [-PostConnectionIPv4Subnet <String[]> ] [-PostConnectionIPv6Subnet <String[]> ] [-PromoteAlternate <Boolean> ] [-RadiusAttributeClass <String> ] [-ResponderAuthenticationMethod <String> ] [-RetryIntervalSeconds <UInt32> ] [-RxBandwidthKbps <UInt64> ] [-SADataSizeForRenegotiationKilobytes <UInt32> ] [-SALifeTimeSeconds <UInt32> ] [-SharedSecret <String> ] [-SourceIpAddress <String> ] [-ThrottleLimit <Int32> ] [-TxBandwidthKbps <UInt64> ] [-UserName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: CustomPolicy
Set-VpnS2SInterface [-Name] <String> -CustomPolicy [-AdminStatus <Boolean> ] [-AsJob] [-AuthenticationMethod <String> ] [-AuthenticationTransformConstants <AuthenticationTransformConstants> ] [-Certificate <X509Certificate2> ] [-CimSession <CimSession[]> ] [-CipherTransformConstants <CipherTransformConstants> ] [-Destination <String[]> ] [-DHGroup <DHGroup> ] [-EapMethod <String> ] [-EnableQoS <EnableQoS> ] [-EncryptionMethod <EncryptionMethod> ] [-Force] [-IdleDisconnectSeconds <UInt32> ] [-InitiateConfigPayload <Boolean> ] [-IntegrityCheckMethod <IntegrityCheckMethod> ] [-InternalIPv4 <Boolean> ] [-InternalIPv6 <Boolean> ] [-IPv4Subnet <String[]> ] [-IPv4TriggerFilter <String[]> ] [-IPv4TriggerFilterAction <Action> ] [-IPv6Subnet <String[]> ] [-IPv6TriggerFilter <String[]> ] [-IPv6TriggerFilterAction <Action> ] [-NetworkOutageTimeSeconds <UInt32> ] [-NumberOfTries <UInt32> ] [-PassThru] [-Password <String> ] [-Persistent] [-PfsGroup <PfsGroup> ] [-PostConnectionIPv4Subnet <String[]> ] [-PostConnectionIPv6Subnet <String[]> ] [-PromoteAlternate <Boolean> ] [-RadiusAttributeClass <String> ] [-ResponderAuthenticationMethod <String> ] [-RetryIntervalSeconds <UInt32> ] [-RxBandwidthKbps <UInt64> ] [-SADataSizeForRenegotiationKilobytes <UInt32> ] [-SALifeTimeSeconds <UInt32> ] [-SharedSecret <String> ] [-SourceIpAddress <String> ] [-ThrottleLimit <Int32> ] [-TxBandwidthKbps <UInt64> ] [-UserName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Descripción detallada
The Set-VpnS2SInterface cmdlet modifies parameters for a site-to-site (S2S) interface. If the connection already exists, then the changes take effect after disconnection.
Use the CustomPolicy parameter to customize IPsec settings. If the protocol is Automatic, then the only authentication method allowed is user name. If the AuthenticationMethod parameter is set to pre-shared key (PSK), then only one interface can be enabled per destination and the initiator and responder policies are governed by what is specified for each interface. If the AuthenticationMethod parameter is set to user name or computer certificates (machine certificates), then only the initiator policies are governed by what is specified for each interface and the responder policies are governed by what is specified on the server.
For incoming connections.
-- If the AuthenticationMethod parameter is set to PSK, then the interface for which the destination IP address matches the incoming IP address is activated.
-- If the AuthenticationMethod parameter is set to user name, then the interface for which the name matches the user name is activated.
-- If the AuthenticationMethod parameter is certificates, then the interface for which the name matches the certificate subject name is activated.
Parámetros
-AdminStatus<Boolean>
Specifies the administrator status of the cmdlet.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-AsJob
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-AuthenticationMethod<String>
Specifies the authentication method to be used by the S2S connection.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
EAP |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-AuthenticationTransformConstants<AuthenticationTransformConstants>
Specifies a transform constant. Los valores aceptables para este parámetro son los siguientes:
-- SHA256128
-- MD596
-- SHA196
-- GCMAES128
-- GCMAES192
-- GCMAES256
Alias |
FirstTransformType,AuthenticationTransformConstant |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-Certificate<X509Certificate2>
Specifies the subject name of the certificate to use in the default store. Applicable only if the AuthenticationMethod parameter is set to MachineCert.
Alias |
Cert |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿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 a cipher transform constant. Los valores aceptables para este parámetro son los siguientes:
-- DES
-- DES3
-- AES128
-- AES192
-- AES256
-- GCMAES128
-- GCMAES192
-- GCMAES256
Alias |
OtherCipherAlgorithm,FirstCipherAlgorithm,CipherTransformConstant |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-CustomPolicy
Specifies the custom IKE IPsec policies, must be a separate parameter set.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-DHGroup<DHGroup>
Specifies the Diffie-Hellman (DH) group in the IPsec policy.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
2 |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-Destination<String[]>
Specifies the destination end point of the S2S connection.
Note: If the Certificate parameter is specified as PSK, then an IP address should be specified for this parameter as a fully qualified domain name (FQDN) will not work.
Alias |
RemoteTunnelEndpoint,RemoteTunnelHostname,RemoteAddress |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-EapMethod<String>
Specifies the EAP method if IkeLocalAuthenticationMethod is EAP.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
MSCHAPv2 |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-EnableQoS<EnableQoS>
Indicates whether to enable Quality of Service (QoS) on an interface.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-EncryptionMethod<EncryptionMethod>
Specifies the encryption method in the IKE policy.
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.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
RequireEncryption |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-Force
Fuerza que el comando se ejecute sin pedir confirmación al usuario.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-IdleDisconnectSeconds<UInt32>
Specifies the time interval, in seconds, after which an idle connection is disconnected. Unless you disable idle timeout, an idle connection is disconnected after this time interval is reached.
Alias |
IdleDurationSeconds,IdleDisconnectSec |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-InitiateConfigPayload<Boolean>
Indicates whether to initiate Config payload negotiation.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-IPv4Subnet<String[]>
Specifies the IPv4 subnet that is routed on this connection with metrics.
Alias |
IPv4TriggerSubnet |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-IPv4TriggerFilter<String[]>
Specifies an array of IPv4 filters that trigger demand dial connections.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue, ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-IPv4TriggerFilterAction<Action>
Indicates whether a filter should trigger an S2S connection.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue, ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-IPv6Subnet<String[]>
Specifies the IPv6 subnet that is routed on this connection with metrics.
Alias |
IPv6TriggerSubnet |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-IPv6TriggerFilter<String[]>
Specifies an array of IPv6 filters that trigger demand dial connections.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue, ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-IPv6TriggerFilterAction<Action>
Indicates whether a filter should trigger an S2S connection.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue, ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-IntegrityCheckMethod<IntegrityCheckMethod>
Specifies the integrity method in the IPsec policy.
Alias |
FirstIntegrityAlgorithm,OtherHashAlgorithm |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
2 |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-InternalIPv4<Boolean>
Specifies that the IPv4 address should be negotiated.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
True |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-InternalIPv6<Boolean>
Specifies that the IPv6 address should be negotiated.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
True |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-Name<String>
Specifies the name of the connection.
Alias |
ElementName |
¿Requerido? |
true |
¿Posición? |
2 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-NetworkOutageTimeSeconds<UInt32>
Specifies the maximum amount of time, in seconds, before a connection is disconnected due to a network outage.
Alias |
NetworkOutageTimeSec |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-NumberOfTries<UInt32>
Specifies the number of connection attempts.
If this parameter is specified as zero (0), then the connection is not retried if the first attempt fails.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
3 |
¿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 |
-Password<String>
Specifies the password for the user name to be used for the connection.
Applicable only if the AuthenticationMethod parameter is set to EAP.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Persistent
Indicates that a connection is not disconnected due to inactivity.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-PfsGroup<PfsGroup>
Specifies the PFS group in the IPsec policy.
Alias |
PfsGroupId |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
3 |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-PostConnectionIPv4Subnet<String[]>
Specifies the IPv4 subnet routes that are added to a site-to-site interface after the connection is established. The values specified are not used to initiate the site-to-site VPN connection.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-PostConnectionIPv6Subnet<String[]>
Specifies the IPv6 subnet routes that are added to a site-to-site interface after the connection is established. The values specified are not used to initiate the site-to-site VPN connection.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-PromoteAlternate<Boolean>
Specifies an alternate IP address that when it successfully connects becomes the primary IP address, and the current primary IP address is moved to the alternate list.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-RadiusAttributeClass<String>
Specifies a RADIUS attribute.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-ResponderAuthenticationMethod<String>
Specifies the authentication method to be used by the S2S initiator to validate the S2S responder.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-RetryIntervalSeconds<UInt32>
Specifies the time interval, in seconds, to wait between retries.
Alias |
RetryIntervalSec |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-RxBandwidthKbps<UInt64>
Specifies the receive bandwidth limit, in kilobits per second (Kbps).
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-SADataSizeForRenegotiationKilobytes<UInt32>
Specifies the amount of data, in kilobytes (KB), that can be transferred using a security association (SA). When the limit is reached, the SA must be renegotiated.
Alias |
SARenegotiationDataSizeKB,LifeTimeKiloBytes |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-SALifeTimeSeconds<UInt32>
Specifies the lifetime, in seconds, of a security association (SA). The SA is no longer valid after this time interval.
Alias |
SaLifeTimeSec,LifeTimeSeconds |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-SharedSecret<String>
Specifies the text of the shared secret to be used for the connection. This parameter is only applicable only if the AuthenticationMethod parameter is set to PSK or the ResponderAuthenticationMethod parameter is set to PSK.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-SourceIpAddress<String>
Specifies the source IPv4 or IPv6 addresses to use when dialing the connection.
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 |
-TxBandwidthKbps<UInt64>
Specifies a transmit bandwidth limit, in Kbps, for the interface.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-UserName<String>
Specifies the user name to be used for the connection. Applicable only if the AuthenticationMethod parameter is set to EAP.
Alias |
User |
¿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.
- None
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
Microsoft.Management.Infrastructure.CimInstance#VpnS2SInterface
El objeto
Microsoft.Management.Infrastructure.CimInstance
es una clase contenedora que muestra objetos de Instrumental de administración de Windows (WMI). La ruta de acceso después del signo de número (#
) proporciona el espacio de nombres y el nombre de clase del objeto WMI subyacente.
Ejemplos
EXAMPLE 1
This example modifies the destination address for the interface named edge1.
PS C:\> Set-VpnS2SInterface –Name edge1 -Destination 131.107.0.4 -PassThru
EXAMPLE 2
This example modifies the initiator authentication method.
PS C:\> Set-VpnS2SInterface –Name edge1 -AuthenticationMethod EAP -EapMethod EAP-MSCHAPv2 -PassThru
EXAMPLE 3
This example modifies the responder authentication method for edge1.
PS C:\> Get-VpnS2SInterface -Name edge1 | Set-VpnS2SInterface -ResponderAuthenticationMethod MachineCertificates -PassThru
EXAMPLE 4
This example changes the authentication method for the interface 3-edge1 to computer certificate and specifies the certificate for which the subject name matches edge1.contoso.com.
PS C:\> $cert1 = ( Get-ChildItem -Path cert:LocalMachine\My | Where-Object -FilterScript { $_.Subject -Like "*CN=edge1.contoso.com" } )
PS C:\> Set-VpnS2SInterface –Name 3-edge1 -AuthenticationMethod MachineCertificates -Certificate $cert1 -ResponderAuthenticationMethod MachineCertificates -PassThru
Temas relacionados
Clear-VpnS2SInterfaceStatistics
Get-VpnServerIPsecConfiguration
Set-VpnServerIPsecConfiguration