Set-SCVPNConnection
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
Set-SCVPNConnection Cmdlet 會更新虛擬私人網路 (VPN) 連線的屬性。
範例
範例 1:修改 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
第一個命令會取得名為 VMGateway01 的網路閘道,然後將它儲存在$VmNetworkGateway變數中。
第二個命令會在閘道上取得$VmNetworkGateway的 VPN 連線,然後將它儲存在$VPNConnection變數中。
第三個命令會取得執行身分帳戶,然後將它儲存在$RunAsAccount變數中。
此帳戶是用來修改 VPN 連線。
最後一個命令會修改 $VPNConnection 中的 VPN 連線。
它會指定數個參數的新值。
參數
-AuthenticationMethod
指定虛擬私人網路 (VPN) 驗證方法。
有效值為:PSKOnly、MachineCertificates。
Type: | VPNAuthenticationMethod |
Accepted values: | PSKOnly, MachineCertificates |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
指定虛擬私人網路 (VPN) 轉換常數。
有效值為:
- 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
指定安全性憑證物件。
Type: | ClientCertificate |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
指定虛擬私人網路加密轉換常數。
有效值為:
- 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
指定 VPN 連線的描述。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DHGroup
指定虛擬私人網路 (VPN) Diffie-Hellman (DH) 群組。
有效值為:
- 無
- Group1
- Group2
- 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
指定虛擬私人網路 (VPN) 加密方法。
有效值為:
- 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
指定一般路由封裝 (GRE) IPv4 位址。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GREIPv6Address
指定 GRE IPv6 位址。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GREKey
指定 GRE 金鑰。
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GRETunnel
表示此 Cmdlet 使用 GRE 通道。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IntegrityCheckMethod
指定虛擬私人網路 (VPN) 完整性檢查方法。
有效值為:
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
指定追蹤工作進度,並將工作進度存放在這個參數命名的變數中。
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
指定以 kbps 為單位的輸入頻寬上限。
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MaximumBandwidthOutboundKbps
指定以 kbps 為單位的輸出頻寬上限。
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
指定 VMM 物件的名稱。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NextHopNetwork
指定 VMNetwork 物件。
Type: | VMNetwork |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUser
指定使用者名稱。
此 Cmdlet 代表此參數指定的使用者運作。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUserRole
指定使用者角色。
若要取得使用者角色,請使用 Get-SCUserRole Cmdlet。
此 Cmdlet 代表此參數所指定的使用者角色運作。
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
指定虛擬私人網路 (VPN) 完美轉寄密碼 (PFS) 群組。
有效值為:
- 無
- 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
指定觸發此動作之 PRO 提示 (PRO 提示的識別碼) 。
此參數可讓您稽核 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
表示作業會以非同步方式執行,讓控制項立即返回命令殼層。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Secret
指定執行身分帳戶。
若要取得執行身分帳戶,請使用 Get-SCRunAsAccount Cmdlet。
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
指定 IPv4 格式的目標 VPN 位址。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TargetIPv6VPNAddress
指定 IPv6 格式的目標 VPN 位址。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMServer
指定 VMM 伺服器物件。
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VPNConnection
指定虛擬私人網路 (VPN) 連線物件。
若要取得 VPN 連線物件,請使用 Get-SCVPNConnection Cmdlet。
Type: | VPNConnection |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |