Compartilhar via


Set-SCVPNConnection

Define as propriedades de uma conexão VPN.

Syntax

Set-SCVPNConnection
   [-VMMServer <ServerConnection>]
   [-VPNConnection] <VPNConnection>
   [-Name <String>]
   [-Description <String>]
   [-TargetIPv4VPNAddress <String>]
   [-TargetIPv6VPNAddress <String>]
   [-EncryptionMethod <VPNEncryptionMethod>]
   [-IntegrityCheckMethod <VPNIntegrityCheckMethod>]
   [-CipherTransformConstants <VPNCipherTransformConstants>]
   [-AuthenticationTransformConstants <VPNAuthenticationTransformConstants>]
   [-PFSGroup <VPNPFSGroup>]
   [-DHGroup <VPNDHGroup>]
   [-AuthenticationMethod <VPNAuthenticationMethod>]
   [-Secret <RunAsAccount>]
   [-Certificate <ClientCertificate>]
   [-IPSecMainSALifeTimeSeconds <UInt32>]
   [-IPSecMainSALifeTimeKiloBytes <UInt32>]
   [-IPSecQuickSALifeTimeSeconds <UInt32>]
   [-IPSecQuickSALifeTimeKiloBytes <UInt32>]
   [-IPSecIdleDisconnectSeconds <UInt32>]
   [-LocalTrafficSelectors <TrafficSelector[]>]
   [-RemoveLocalTrafficSelectors]
   [-RemoteTrafficSelectors <TrafficSelector[]>]
   [-RemoveRemoteTrafficSelectors]
   [-Status <GatewayConnectionStatus>]
   [-MaximumBandwidthInboundKbps <UInt64>]
   [-MaximumBandwidthOutboundKbps <UInt64>]
   [-RemoveMaximumBandwidthInbound]
   [-RemoveMaximumBandwidthOutbound]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
Set-SCVPNConnection
   [-VMMServer <ServerConnection>]
   [-VPNConnection] <VPNConnection>
   [-NextHopNetwork <VMNetwork>]
   [-Name <String>]
   [-Description <String>]
   [-Status <GatewayConnectionStatus>]
   [-MaximumBandwidthInboundKbps <UInt64>]
   [-MaximumBandwidthOutboundKbps <UInt64>]
   [-RemoveMaximumBandwidthInbound]
   [-RemoveMaximumBandwidthOutbound]
   [-IPAddresses <String[]>]
   [-PeerIPAddresses <String[]>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
Set-SCVPNConnection
   [-VMMServer <ServerConnection>]
   [-VPNConnection] <VPNConnection>
   [-Name <String>]
   [-Description <String>]
   [-TargetIPv4VPNAddress <String>]
   [-TargetIPv6VPNAddress <String>]
   [-Status <GatewayConnectionStatus>]
   [-MaximumBandwidthInboundKbps <UInt64>]
   [-MaximumBandwidthOutboundKbps <UInt64>]
   [-RemoveMaximumBandwidthInbound]
   [-RemoveMaximumBandwidthOutbound]
   [-GRETunnel]
   [-GREKey <UInt32>]
   [-GREIPv4Address <String>]
   [-GREIPv6Address <String>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]

Description

O cmdlet Set-SCVPNConnection atualiza as propriedades de uma conexão VPN (rede virtual privada).

Exemplos

Exemplo 1: modificar uma conexão VPN

PS C:\> $VmNetworkGateway = Get-SCVMNetworkGateway -Name "VMGateway01"
PS C:\> $VPNConnection = Get-SCVPNConnection -VMNetworkGateway $VmNetworkGateway -Name "VPN01"
PS C:\> $RunAsAccount = Get-SCRunAsAccount -ID "972567d5-96ad-472e-9790-831bae5fd69c" 
PS C:\> $VpnConnection = Set-SCVPNConnection -AuthenticationMethod "PSKOnly" -AuthenticationTransformConstants "SHA196" -CipherTransformConstants "AES256" -DHGroup "Group2" -EncryptionMethod "AES256" -IntegrityCheckMethod "SHA1" -PFSGroup "PFS2048" -Name "IPSec" -TargetIPv4VPNAddress "100.100.100.200" -VPNConnection $VPNConnection -Secret $RunAsAccount

O primeiro comando obtém um gateway de rede chamado VMGateway01 e, em seguida, armazena-o na variável $VmNetworkGateway.

O segundo comando obtém uma conexão VPN no gateway no $VmNetworkGateway e, em seguida, armazena-a na variável $VPNConnection.

O terceiro comando obtém uma conta Executar como e, em seguida, armazena-a na variável $RunAsAccount. Essa conta é usada para modificar a conexão VPN.

O comando final modifica a conexão VPN em $VPNConnection. Ele especifica novos valores para vários parâmetros.

Parâmetros

-AuthenticationMethod

Especifica um método de autenticação VPN (rede virtual privada). Os valores válidos são: PSKOnly, MachineCertificates.

Type:VPNAuthenticationMethod
Accepted values:PSKOnly, MachineCertificates
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AuthenticationTransformConstants

Especifica uma constante de transformação vpn (rede virtual privada). Os valores válidos são:

  • SHA256128
  • MD596
  • SHA196
  • GCMAES128
  • GCMAES192
  • GCMAES256
Type:VPNAuthenticationTransformConstants
Accepted values:SHA256128, MD596, SHA196, GCMAES128, GCMAES192, GCMAES256, SHA256, None
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Certificate

Especifica um objeto de certificado de segurança.

Type:ClientCertificate
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CipherTransformConstants

Especifica uma constante de transformação de codificação de rede privada virtual. Os valores válidos são:

  • DES
  • DES3
  • AES128
  • AES192
  • AES256
  • GCMAES128
  • GCMAES192
  • GCMAES256
Type:VPNCipherTransformConstants
Accepted values:DES, DES3, AES128, AES192, AES256, GCMAES128, GCMAES192, GCMAES256, None
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Description

Especifica uma descrição para a conexão VPN.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DHGroup

Especifica um grupo de Diffie-Hellman (DH) de rede virtual privada (VPN). Os valores válidos são:

  • Nenhum
  • Grupo1
  • Grupo 2
  • Group14
  • ECP256
  • ECP384
  • Group24
Type:VPNDHGroup
Accepted values:None, Group1, Group2, Group14, ECP256, ECP384, Group24
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionMethod

Especifica um método de criptografia vpn (rede virtual privada). Os valores válidos são:

  • DES
  • DES3
  • AES128
  • AES192
  • AES256
Type:VPNEncryptionMethod
Accepted values:DES, DES3, AES128, AES192, AES256, CBCDES, CBCDES3, AES128CBC, AES192CBC, AES256CBC, GCMAES128, GCMAES192, GCMAES256
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-GREIPv4Address

Especifica um endereço IPv4 de Encapsulamento de Rota Genérico (GRE).

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-GREIPv6Address

Especifica um endereço GRE IPv6.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-GREKey

Especifica uma chave GRE.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-GRETunnel

Indica que esse cmdlet usa um túnel GRE.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-IntegrityCheckMethod

Especifica um método de verificação de integridade da VPN (rede virtual privada). Os valores válidos são:

  • MD5
  • SHA1
  • SHA256
  • SHA384
Type:VPNIntegrityCheckMethod
Accepted values:MD5, SHA1, SHA256, SHA384, SHA196
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IPAddresses

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IPSecIdleDisconnectSeconds

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IPSecMainSALifeTimeKiloBytes

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IPSecMainSALifeTimeSeconds

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IPSecQuickSALifeTimeKiloBytes

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IPSecQuickSALifeTimeSeconds

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-JobVariable

Especifica que o andamento do trabalho é controlado e armazenado na variável nomeada por esse parâmetro.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LocalTrafficSelectors

Type:TrafficSelector[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MaximumBandwidthInboundKbps

Especifica, em kbps, a largura de banda máxima de entrada.

Type:UInt64
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MaximumBandwidthOutboundKbps

Especifica, em kbps, a largura de banda máxima de saída.

Type:UInt64
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Especifica o nome de um objeto VMM.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-NextHopNetwork

Especifica um objeto VMNetwork .

Type:VMNetwork
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-OnBehalfOfUser

Especifica um nome de usuário. Esse cmdlet opera em nome do usuário especificado por esse parâmetro.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-OnBehalfOfUserRole

Especifica uma função de usuário. Para obter uma função de usuário, use o cmdlet Get-SCUserRole . Esse cmdlet opera em nome da função de usuário especificada por esse parâmetro.

Type:UserRole
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PeerIPAddresses

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PFSGroup

Especifica um grupo de PFS (Rede Virtual Privada Privada) Perfeito Para Encaminhamento (PFS). Os valores válidos são:

  • Nenhum
  • PFS1
  • PFS2
  • PFS2048
  • ECP256
  • ECP384
  • PFSMM
  • PFS24
Type:VPNPFSGroup
Accepted values:None, PFS1, PFS2, PFS2048, ECP256, ECP384, PFSMM, PFS24, PFS14
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PROTipID

Especifica a ID da dica de Desempenho e Otimização de Recursos (dica PRO) que disparou essa ação. Esse parâmetro permite que você audite dicas pro.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RemoteTrafficSelectors

Type:TrafficSelector[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RemoveLocalTrafficSelectors

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RemoveMaximumBandwidthInbound

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RemoveMaximumBandwidthOutbound

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RemoveRemoteTrafficSelectors

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RunAsynchronously

Indica que o trabalho é executado de forma assíncrona para que o controle retorne imediatamente ao shell de comando.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Secret

Especifica uma conta Executar como.

Para obter uma conta Executar como, use o cmdlet Get-SCRunAsAccount .

Type:RunAsAccount
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Status

Type:GatewayConnectionStatus
Accepted values:Error, Enabled, Disabled
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TargetIPv4VPNAddress

Especifica um endereço VPN de destino no formato IPv4.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TargetIPv6VPNAddress

Especifica um endereço VPN de destino no formato IPv6.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VMMServer

Especifica um objeto de servidor do VMM.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-VPNConnection

Especifica um objeto de conexão VPN (rede virtual privada).

Para obter um objeto de conexão VPN, use o cmdlet Get-SCVPNConnection .

Type:VPNConnection
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False