Set-SCVPNConnection

Define as propriedades de uma ligaçã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 ligação de rede privada virtual (VPN).

Exemplos

Exemplo 1: Modificar uma ligaçã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 recebe uma porta de rede chamada VMGateway01, e depois armazena-o na variável $VmNetworkGateway.

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

O terceiro comando recebe uma conta Run As, e depois armazena-a na variável $RunAsAccount. Esta conta é usada para modificar a ligação VPN.

O comando final modifica a ligação VPN em $VPNConnection. Especifica novos valores para vários parâmetros.

Parâmetros

-AuthenticationMethod

Especifica um método de autenticação de rede privada virtual (VPN). 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 de rede privada virtual (VPN). 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 rede privada virtual transforma constantes. 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 ligação VPN.

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

-DHGroup

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

  • Nenhuma
  • Grupo1
  • Grupo 2
  • Grupo14
  • ECP256
  • ECP384
  • Grupo24
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 encriptação de rede privada virtual (VPN). 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 Rota Genérica (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 este 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 de rede privada virtual (VPN). 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 progresso do trabalho é rastreado e armazenado na variável nomeada por este 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 utilizador. Este cmdlet funciona em nome do utilizador que este parâmetro especifica.

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

-OnBehalfOfUserRole

Especifica uma função de utilizador. Para obter uma função de utilizador, utilize o cmdlet Get-SCUserRole . Este cmdlet funciona em nome da função de utilizador que este parâmetro especifica.

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 rede privada virtual (VPN) Perfect Forward Secrecy (PFS). Os valores válidos são:

  • Nenhuma
  • 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 o ID da ponta de otimização de desempenho e recursos (ponta PRO) que desencadeou esta ação. Este parâmetro permite-lhe auditar 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 funciona assíncronamente para que o controlo volte imediatamente à concha de comando.

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

-Secret

Especifica uma conta Run As.

Para obter uma conta Run As, utilize 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 alvo 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 alvo 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 VMM.

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

-VPNConnection

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

Para obter um objeto de ligação VPN, utilize o cmdlet Get-SCVPNConnection .

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