Dela via


Set-SCVPNConnection

Anger egenskaperna för en VPN-anslutning.

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

Cmdleten Set-SCVPNConnection uppdaterar egenskaperna för en VPN-anslutning (virtuellt privat nätverk).

Exempel

Exempel 1: Ändra en VPN-anslutning

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

Det första kommandot hämtar en nätverksgateway med namnet VMGateway01 och lagrar den sedan i variabeln $VmNetworkGateway.

Det andra kommandot hämtar en VPN-anslutning på gatewayen i $VmNetworkGateway och lagrar den sedan i variabeln $VPNConnection.

Det tredje kommandot hämtar ett Kör som-konto och lagrar det sedan i variabeln $RunAsAccount. Det här kontot används för att ändra VPN-anslutningen.

Det sista kommandot ändrar VPN-anslutningen i $VPNConnection. Den anger nya värden för flera parametrar.

Parametrar

-AuthenticationMethod

Anger en autentiseringsmetod för virtuellt privat nätverk (VPN). Giltiga värden är: PSKOnly, MachineCertificates.

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

-AuthenticationTransformConstants

Anger en transformeringskonstant för virtuellt privat nätverk (VPN). Giltiga värden är:

  • 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

Anger ett säkerhetscertifikatobjekt.

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

-CipherTransformConstants

Anger ett virtuellt privat nätverks chiffertransformeringskonstanter. Giltiga värden är:

  • 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

Anger en beskrivning av VPN-anslutningen.

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

-DHGroup

Anger ett virtuellt privat nätverk (VPN) Diffie-Hellman grupp (DH). Giltiga värden är:

  • Ingen
  • Grupp1
  • Grupp 2
  • Grupp 14
  • ECP256
  • ECP384
  • Grupp 24
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

Anger en krypteringsmetod för virtuellt privat nätverk (VPN). Giltiga värden är:

  • 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

Anger en GRE(Generic Route Encapsulation) IPv4-adress.

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

-GREIPv6Address

Anger en GRE IPv6-adress.

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

-GREKey

Anger en GRE-nyckel.

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

-GRETunnel

Anger att denna cmdlet använder en GRE-tunnel.

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

-IntegrityCheckMethod

Anger en integritetskontrollmetod för virtuellt privat nätverk (VPN). Giltiga värden är:

  • 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

Anger att jobb förloppet spåras och lagras i variabeln med namnet av den här parametern.

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

Anger den maximala inkommande bandbredden i kbit/s.

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

-MaximumBandwidthOutboundKbps

Anger i kbps den maximala utgående bandbredden.

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

-Name

Anger namnet på ett VMM-objekt.

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

-NextHopNetwork

Anger ett VMNetwork-objekt .

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

-OnBehalfOfUser

Anger ett användarnamn. Den här cmdleten fungerar för användarens räkning som den här parametern anger.

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

-OnBehalfOfUserRole

Anger en användarroll. Om du vill skaffa en användarroll använder du cmdleten Get-SCUserRole . Den här cmdleten fungerar för den användarroll som den här parametern anger.

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

Anger en PFS-grupp (Perfect Forward Secrecy) för ett virtuellt privat nätverk (VPN). Giltiga värden är:

  • Ingen
  • 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

Anger ID för tipset om prestanda- och resursoptimering (PRO-tips) som utlöste den här åtgärden. Med den här parametern kan du granska PRO-tips.

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

Anger att jobbet körs asynkront så att kontrollen återgår till kommandogränssnittet omedelbart.

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

-Secret

Anger ett Kör som-konto.

Om du vill skaffa ett Kör som-konto använder du cmdleten 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

Anger en VPN-måladress i IPv4-format.

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

-TargetIPv6VPNAddress

Anger en VPN-måladress i IPv6-format.

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

-VMMServer

Anger ett VMM-serverobjekt.

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

-VPNConnection

Anger ett VPN-anslutningsobjekt (virtuellt privat nätverk).

Om du vill hämta ett VPN-anslutningsobjekt använder du cmdleten Get-SCVPNConnection .

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