Observação
O acesso a essa página exige autorização. Você pode tentar entrar ou alterar diretórios.
O acesso a essa página exige autorização. Você pode tentar alterar os diretórios.
Changes the configuration settings of an existing VPN connection profile.
Parameter Set: InboxProfile
Set-VpnConnection [-Name] <String> [[-ServerAddress] <String> ] [[-TunnelType] <String> ] [[-EncryptionLevel] <String> ] [[-AuthenticationMethod] <String[]> ] [[-SplitTunneling] <Boolean> ] [[-AllUserConnection]] [[-L2tpPsk] <String> ] [[-RememberCredential] <Boolean> ] [[-UseWinlogonCredential] <Boolean> ] [[-EapConfigXmlStream] <XmlDocument> ] [-AsJob] [-CimSession <CimSession[]> ] [-DnsSuffix <String> ] [-Force] [-IdleDisconnectSeconds <UInt32> ] [-MachineCertificateEKUFilter <String[]> ] [-MachineCertificateIssuerFilter <X509Certificate2> ] [-PassThru] [-ServerList <CimInstance[]> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ThirdParty
Set-VpnConnection [-Name] <String> [[-ServerAddress] <String> ] [-ThirdPartyVpn] [[-SplitTunneling] <Boolean> ] [[-RememberCredential] <Boolean> ] [[-PlugInApplicationID] <String> ] [-AsJob] [-CimSession <CimSession[]> ] [-CustomConfiguration <XmlDocument> ] [-DnsSuffix <String> ] [-Force] [-IdleDisconnectSeconds <UInt32> ] [-PassThru] [-ServerList <CimInstance[]> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
The Set-VpnConnection cmdlet changes the configuration settings of an existing VPN connection profile. If the VPN profile specified does not exist, you see an error. If errors occur when you modify the VPN profile, the cmdlet returns the error information.
Indicates that the VPN connection specified is in the global phone book.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
8 |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Specifies the authentication method to use for the VPN connection. Os valores aceitáveis para este parâmetro são: PAP, CHAP, MSCHAPv2, or EAP.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
6 |
Valor padrão |
MSChapv2 |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Executa o cmdlet em uma sessão remota ou em um computador remoto. Insira um nome do computador ou um objeto de sessão, como a saída de um cmdlet New-CimSession ou Get-CimSession. O padrão é a sessão atual do computador local.
Aliases |
Session |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Specifies an XML document that allows vendors to specify custom configuration information.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Specifies the DNS suffix of the VPN connection.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Specifies the contents of the EAP XML configuration file, which includes the EAP method ID.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
12 |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Specifies the encryption level for the VPN connection. Os valores aceitáveis para este parâmetro são: NoEncryption, Optional, Required and Maximum.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
5 |
Valor padrão |
Required |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Indicates that the pre-shared key (PSK) value is supplied over an insecure channel, if L2TP is used.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Specifies the time, in seconds, before closing an idle connection.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Specifies the value of the PSK to be used for L2TP authentication. If this parameter is not specified, a certificate is used for L2TP.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
9 |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Specifies an array of enhanced key usage (EKU) filters for Internet Key Exchange version 2 (IKEv2) machine certificate selection.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Specifies the X509 certificate of the issuer filter for IKEv2 machine certificate selection.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Specifies the name of the VPN connection profile.
Aliases |
ConnectionName |
Necessário? |
true |
Posição? |
2 |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Retorna um objeto que representa o item com o qual você está trabalhando. Por padrão, este cmdlet não gera saída.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Specifies the identifier for a third party application.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
11 |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Indicates that the credentials supplied at the time of first successful connection is stored in the cache, if set to $True.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
10 |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Specifies the address of the remote VPN server to which the client connects. You can specify the address as a fully qualified domain name (FQDN), an IPv4 address, or an IPv6 address.
Aliases |
ServerName,DefaultServer |
Necessário? |
false |
Posição? |
3 |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Specifies an array of VPN servers. The VPN client can connect to these servers.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Indicates whether the cmdlet enables split tunneling for the VPN connection profile. When you enable split tunneling, traffic to destinations outside the intranet does not flow through the VPN tunnel. Specify a value of $True to enable split tunneling.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
7 |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Indicates that the cmdlet runs for a third party profile.
Aliases |
nenhuma |
Necessário? |
true |
Posição? |
4 |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Especifica o número máximo de operações simultâneas que podem ser estabelecidas para executar o cmdlet. Se esse parâmetro for omitido ou um valor de 0
for inserido, o Windows PowerShell® calculará o limite ideal de restrição para o cmdlet com base no número de cmdlets do CIM que estão em execução no computador. O limite de restrição se aplica somente ao cmdlet atual, e não à sessão ou ao computador.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Specifies the type of tunnel used for the VPN connection. Os valores aceitáveis para este parâmetro são: PPTP, L2TP, SSTP, IKEv2, or Automatic.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
4 |
Valor padrão |
Automatic |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Indicates whether to use Windows logon credentials. Specify a value of $True to use MSCHAPv2 or EAP-MSCHAPv2 as the authentication method and use Windows logon credentials automatically when connecting with the VPN connection profile.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
11 |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Solicita que você confirme antes de executar o cmdlet.
Necessário? |
false |
Posição? |
named |
Valor padrão |
false |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Mostra o que aconteceria se o cmdlet fosse executado. O cmdlet não é executado.
Necessário? |
false |
Posição? |
named |
Valor padrão |
false |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Esse cmdlet dá suporte a parâmetros comuns: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer e -OutVariable. Para obter mais informações, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
O tipo de entrada é o tipo dos objetos que você pode canalizar para o cmdlet.
O tipo de saída é o tipo de objeto emitido pelo cmdlet.
Microsoft.Management.Infrastructure.CimInstance#VpnConnection
O objeto
Microsoft.Management.Infrastructure.CimInstance
é uma classe wrapper que exibe objetos da WMI (Instrumentação de Gerenciamento do Windows). O caminho após o sinal de cerquilha (#
) indica o namespace e o nome de classe do objeto subjacente da WMI.
The VpnConnection object contains the VpnConnection configuration settings.
This command configures the VPN connection named Test1 to connect to the server with an IP address of 10.1.1.2. By specifying the Passthru parameter, you can see the configuration of the VPN connection object.
PS C:\> Set-VpnConnection -Name "Test1" -ServerAddress "10.1.1.2" -PassThru
This command configures the VPN connection named Test3 and located in the global phone book as follows:
-- The connection is configured to use L2tp as the tunnel type, as specified by the TunnelType parameter
-- The tunnel is using optional encryption, as specified by the EncryptionLevel parameter
-- The authentication method used by the connection is PAP, as specified by the AuthenticationMethod parameter
-- Split tunneling is turned off, as specified by the SplitTunneling parameter, and the value of $False
-- Credential caching is turned off, as specified by the RememberCredential parameter and the value of $False
By specifying the Passthru parameter, you can see the configuration of the VPN connection object.
PS C:\> Set-VpnConnection -Name "Test3" -AllUserConnection -TunnelType L2tp -EncryptionLevel Optional -AuthenticationMethod Pap -SplitTunneling $False -RememberCredential $False -PassThru
This set of commands first creates a custom EAP configuration, and then configures a VPN connection from the global phone book to use the new custom EAP configuration.
For more information about custom EAP creation, see the New-EapConfiguration cmdlet.
This command stores the result of the New-EapConfiguration cmdlet into the variable named $A.
PS C:\> $A = New-EapConfiguration -Tls
This command configures the VPN connection named Test4 in the global phone book to use the custom EAP configuration by:
-- Specifying the AuthenticationMethod parameter with the value EAP
-- Specifying the EapConfigXmlStream parameter with the value of the EapConfigXmlStream method of the previously created variable.
By specifying the Passthru parameter, you can see the configuration of the VPN connection object.
PS C:\> Set-VpnConnection -Name "Test4" -AllUserConnection -AuthenticationMethod Eap -EapConfigXmlStream $A.EapConfigXmlStream -PassThru