Set-VpnServerConfiguration
Set-VpnServerConfiguration
Configures VPN server properties.
構文
Parameter Set: EncryptionType
Set-VpnServerConfiguration [-AsJob] [-CimSession <CimSession[]> ] [-EncryptionType <String> ] [-IdleDisconnectSeconds <UInt32> ] [-Ikev2Ports <UInt32> ] [-L2tpPorts <UInt32> ] [-PassThru] [-SADataSizeForRenegotiationKilobytes <UInt32> ] [-SALifeTimeSeconds <UInt32> ] [-SstpPorts <UInt32> ] [-ThrottleLimit <Int32> ] [-TunnelType <TunnelType> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: CustomPolicy
Set-VpnServerConfiguration -CustomPolicy [-AsJob] [-AuthenticationTransformConstants <AuthenticationTransformConstants> ] [-CimSession <CimSession[]> ] [-CipherTransformConstants <CipherTransformConstants> ] [-DHGroup <DHGroup> ] [-EncryptionMethod <EncryptionMethod> ] [-IdleDisconnectSeconds <UInt32> ] [-Ikev2Ports <UInt32> ] [-IntegrityCheckMethod <IntegrityCheckMethod> ] [-L2tpPorts <UInt32> ] [-PassThru] [-PfsGroup <PfsGroup> ] [-SADataSizeForRenegotiationKilobytes <UInt32> ] [-SALifeTimeSeconds <UInt32> ] [-SstpPorts <UInt32> ] [-ThrottleLimit <Int32> ] [-TunnelType <TunnelType> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: RevertToDefault
Set-VpnServerConfiguration -RevertToDefault [-AsJob] [-CimSession <CimSession[]> ] [-PassThru] [-ThrottleLimit <Int32> ] [-TunnelType <TunnelType> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
詳細説明
The Set-VpnServerConfiguration cmdlet configures virtual private network (VPN) server properties. The cmdlet modifies settings for a Routing and Remote Access service (RRAS) server for incoming server-to-server protocol (S2S protocol) VPN interfaces.
You can configure the size and duration of a security association (SA), and specify an idle disconnect time.
Specify an encryption type by using the EncryptionType parameter
Create a custom policy by specifying the CustomPolicy parameter. You can specify a tunnel type and how many ports to create for different tunnel types. You can also specify cipher transform constants, Diffie-Hellman (DH) group, encryption method, integrity method, and perfect forward secrecy (PFS) group.
Change the settings back to default values by using the RevertToDefault parameter.
パラメーター
-AsJob
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-AuthenticationTransformConstants<AuthenticationTransformConstants>
Specifies authentication transform constants. このパラメーターに対して使用できる値:
-- SHA256128
-- MD596
-- SHA196
-- GCMAES128
-- GCMAES192
-- GCMAES256
-- None
エイリアス |
FirstTransformType |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-CimSession<CimSession[]>
リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。
エイリアス |
Session |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-CipherTransformConstants<CipherTransformConstants>
Specifies cipher transform constants. このパラメーターに対して使用できる値:
-- DES
-- DES3
-- AES128
-- AES192
-- AES256
-- GCMAES128
-- GCMAES192
-- GCMAES256
-- None
エイリアス |
FirstCipherAlgorithm,OtherCipherAlgorithm |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-CustomPolicy
Indicates that the cmdlet sets custom Internet Key Exchange (IKE) Internet Protocol security (IPsec) policies.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-DHGroup<DHGroup>
Specifies a DH group. The server uses this value to generate IKE keys. このパラメーターに対して使用できる値:
-- Group1
-- Group2
-- Group14
-- ECP256
-- ECP384
-- Group24
-- None
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
2 |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-EncryptionMethod<EncryptionMethod>
Specifies an encryption method. The server uses this encryption method to generate IKE keys. このパラメーターに対して使用できる値:
-- DES
-- DES3
-- AES128
-- AES192
-- AES256
エイリアス |
Encryption |
必須? |
false |
位置は? |
named |
既定値 |
4 |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-EncryptionType<String>
Specifies the type of encryption. このパラメーターに対して使用できる値:
-- NoEncryption
-- RequireEncryption
-- OptionalEncryption
-- MaximumEncryption
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
OptionalEncryption |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-IdleDisconnectSeconds<UInt32>
Specifies amount of time, in seconds, after which the server disconnects an idle connection.
エイリアス |
IdleDurationSeconds |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Ikev2Ports<UInt32>
Specifies the number of ports to create for IKE version 2.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-IntegrityCheckMethod<IntegrityCheckMethod>
Specify the integrity check method for IPsec. このパラメーターに対して使用できる値:
-- MD5
-- SHA1
-- SHA256
-- SHA384
エイリアス |
FirstIntegrityAlgorithm,OtherHashAlgorithm |
必須? |
false |
位置は? |
named |
既定値 |
2 |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-L2tpPorts<UInt32>
Specifies the number of ports to create for Layer Two Tunneling Protocol (L2TP).
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-PassThru
作業中の項目を表すオブジェクトを返します。既定では、このコマンドレットによる出力はありません。
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-PfsGroup<PfsGroup>
Specifies the PFS group. このパラメーターに対して使用できる値:
-- PFS1
-- PFS2
-- PFS2048
-- ECP256
-- ECP384
-- PFSMM
-- PFS24
-- None
エイリアス |
PfsGroupId |
必須? |
false |
位置は? |
named |
既定値 |
3 |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-RevertToDefault
Indicates that the cmdlet sets IPsec properties to their default values.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-SADataSizeForRenegotiationKilobytes<UInt32>
Specifies the amount of data, in kilobytes, to transfer using a particular SA. When data transfer reaches this limit, the server renegotiates the SA.
エイリアス |
LifeTimeKiloBytes |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-SALifeTimeSeconds<UInt32>
Specifies the length of time, in seconds, of an SA. After this interval, the SA becomes invalid.
エイリアス |
LifeTimeSeconds |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-SstpPorts<UInt32>
Specifies the number of ports to create for Secure Socket Tunneling Protocol (SSTP).
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-ThrottleLimit<Int32>
このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0
を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-TunnelType<TunnelType>
Specifies a tunnel type. The custom policy applies to this type of tunnel. このパラメーターに対して使用できる値:
-- PPTP. Point-to-Point Tunneling Protocol.
-- L2TP. Layer Two Tunneling Protocol.
-- SSTP. Secure Socket Tunneling Protocol.
-- IKEv2. Internet Key Exchange version 2.
-- Automatic.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Confirm
コマンドレットを実行する前に、ユーザーに確認を求めます。
必須? |
false |
位置は? |
named |
既定値 |
false |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-WhatIf
コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。
必須? |
false |
位置は? |
named |
既定値 |
false |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
- Microsoft.Management.Infrastructure.CimInstance#VpnServerIPsecConfiguration
例
Example 1: Change the idle disconnect time
This command changes the idle disconnect time to 1000 seconds for the VPN server. The command includes the PassThru parameter, so the command sends a VpnServerIPsecConfiguration object to the console.
PS C:\> Set-VpnServerConfiguration -IdleDisconnectSeconds 1000 -PassThru
Example 2: Configure a custom IPsec policy
This command configures a custom IPsec policy for incoming VPN connections and S2S protocol VPN connections that do not use a pre-shared key as an authentication method.
PS C:\> Set-VpnServerConfiguration -CustomPolicy -AuthenticationTransformConstants "SHA256128" -CipherTransformConstants "AES128" -DHhGroup "Group2" -EncryptionMethod "AES128" -IntegrityCheckMethod "SHA256" -PassThru -PfsGroup "PFS2"