Set-NetTCPSetting

Modify a TCP setting.

Syntax
      Set-NetTCPSetting { [[-SettingName] String[]] | -InputObject CimInstance[] }
         [-AutoReusePortRangeNumberOfPorts UInt16] [-AutoReusePortRangeStartPort UInt16]
            [-AutoTuningLevelLocal AutoTuningLevelLocal] [-AutomaticUseCustom AutomaticUseCustom]
               [-CimSession CimSession[]] [-CongestionProvider CongestionProvider] [-CwndRestart CwndRestart]
                  [-DelayedAckFrequency Byte] [-DelayedAckTimeoutMs UInt32] [-DynamicPortRangeStartPort UInt16]
                     [-DynamicPortRangeNumberOfPorts UInt16] [-EcnCapability EcnCapability] [-ForceWS ForceWS]
                        [-InitialCongestionWindowMss UInt32] [-InitialRtoMs UInt32] [-MaxSynRetransmissions Byte]
                           [-MemoryPressureProtection MemoryPressureProtection] [-MinRtoMs UInt32]
                              [-Timestamps Timestamps] [-ScalingHeuristics ScalingHeuristics]
                                 [-NonSackRttResiliency NonSackRttResiliency] [-ThrottleLimit Int32] [-AsJob] [-PassThru]
                                    [-Confirm] [-WhatIf] [CommonParameters]
Key
   -AsJob
       Run the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

   -AutomaticUseCustom
       Whether the automatic profile assigns a custom template, either Datacenter Custom or Internet Custom,
       to a connection. The acceptable values for this parameter are: Enabled or Disabled.

   -AutoReusePortRangeNumberOfPorts
       The number of ports for the auto-reuse port range, which is a port range used for local ephemeral
       port selection by outbound TCP connections for which either SO_REUSE_UNICASTPORT has been set on the socket,
       or for which connect() has been called without calling bind() on the socket.

       If you specify 0, the auto-reuse feature is disabled and ephemeral ports are drawn instead from the dynamic port range
       as specified by DynamicPortRangeStartPort and DynamicPortRangeNumberOfPorts, even if SO_REUSE_UNICASTPORT is set on a socket.

   -AutoReusePortRangeStartPort
       The number of ports for the auto-reuse port range, which is a port range used for local ephemeral
       port selection by outbound TCP connections for which either SO_REUSE_UNICASTPORT has been set on the socket,
       or for which connect() has been called without calling bind() on the socket.

       If you specify 0, the auto-reuse feature is disabled and ephemeral ports are drawn instead from the dynamic port range
       as specified by DynamicPortRangeStartPort and DynamicPortRangeNumberOfPorts, even if SO_REUSE_UNICASTPORT is set on a socket.

   -AutoTuningLevelLocal
       A TCP auto-tuning level for the host computer.
       TCP auto-tuning can improve throughput on high throughput, high latency networks.
       Accepted values for this are:
         • Disabled. Sets the TCP receive window to the default value.
         • HighlyRestricted. Sets the TCP receive window to grow beyond the default value, but very conservatively.
         • Restricted. Sets the TCP receive window to grow beyond the default value, but less conservatively than HighlyRestricted.
         • Normal. Sets the TCP receive window to grow to accommodate almost all scenarios.
         • Experimental. Sets the TCP receive window to grow to accommodate extreme scenarios.

   -CimSession
       Run the cmdlet in a remote session or on a remote computer.
       Enter a computer name or a session object, such as the output of New-CimSession or Get-CimSession.
       The default is the current session on the local computer.

   -CongestionProvider
       The congestion provider property that TCP uses.
       The accepted values are:
         • CTCP     Compound TCP increases the receive window and amount of data sent.
                    CTCP can improve throughput on higher latency connections.
         • DCTCP    Data Center TCP adjusts the TCP window based on network congestion feedback based on
                    Explicit Congestion Notification (ECN) signaling.
                    DCTCP may improve throughput on low latency links.
         • Default  Servers use DCTCP by default.
                    Client computers use NewReno. For information about NewReno, see RFC 3782.

   -CwndRestart
       Whether to enable congestion window restart.
       Congestion window restart can avoid slow start to optimize throughput on low latency networks.
       For more information about congestion window restart, see RFC 2581.
       The accepted values are:
         • True   TCP uses congestion window restart.
         • False  TCP uses the default setting of the connection.

   -DelayedAckFrequency
       The number of acknowledgments (ACKs) received before the computer sends a response.

   -DelayedAckTimeoutMs
       The time to wait, in milliseconds, before the computer sends an ACK if the computer
       receives fewer than delayed acknowledgment frequency of packets.
       Use the DelayedAckFrequency parameter to specify the delayed ACK frequency value.
       Reducing the time to wait can increase throughput on low latency networks by accelerating growth
       in TCP window size. The acceptable values for this parameter are: increments of 10, from 10 through 600.

   -DynamicPortRangeNumberOfPorts
       The number of ports for the dynamic port range that starts from the port that
       you specify for the DynamicPortRangeStartPort parameter.

   -DynamicPortRangeStartPort
       The starting port for the dynamic port range.
       This parameter sets the starting port to send and receive TCP traffic.
       The acceptable values for this parameter are: 1 through 65535.

   -EcnCapability
       Whether to enable ECN capability.
       The accepted values are:
         • Enabled   Use ECN capability.     
         • Disabled  Do not use ECN capability.
       If you specify a value of Disabled, UseECT0, or UseEct1 for the EcnMarking parameter of
       the Set-NetIPInterface cmdlet, the current parameter has no effect.

   -ForceWS
       Whether to force window scaling for retransmission.
       The accepted values are:
         • Enabled  Requires window scaling for retransmission.
         • Disabled Does not require window scaling for retransmission. (default)

   -InitialCongestionWindowMss
       The initial size of the congestion window.
       Provide a value to multiply by the maximum segment size (MSS).
       The accepted values are: Even numbers from 2 through 64.

   -InitialRtoMs
       The period, in milliseconds, before connect, or SYN, retransmit.
       The accepted values are: increments of 10, from 300 ms through 3000 ms.

   -InputObject
       The input object that is used in a pipeline command.

   -MaxSynRetransmissions
       The maximum number of times the computer sends SYN packets without receiving a response.

   -MemoryPressureProtection
       Whether to use memory pressure protection.
       TCP memory pressure protection helps ensure that a computer continues normal operation when
       low on memory due to denial of service attacks.
       The accepted values are: 
         • Enabled   When low on memory, during an attack, close existing TCP connections and drop incoming SYN requests.
         • Disabled  Do not use memory pressure protection.
         • Default   Use the computer default value for memory pressure protection.

   -MinRtoMs 
       A value, in milliseconds, for the TCP retransmission to time out.
       The accepted values are: increments of 10, from 20 ms through 300 ms.

   -NonSackRttResiliency
       Whether to enable round trip time resiliency for clients that do not support selective acknowledgment.
       The accepted values are:  Enabled or Disabled

   -PassThru
       Return an object representing the item with which you are working. By default, this cmdlet does not generate any output.

   -ScalingHeuristics
       Whether to enable scaling heuristics.
       The accepted values are:  Enabled or Disabled

   -SettingName
       An array of setting names. You can specify only 'Custom' for this parameter.

   -ThrottleLimit 
       The maximum number of concurrent operations that can be established to run the cmdlet.
       If this parameter is omitted or a value of 0 is entered, then PowerShell calculates an optimum throttle
       limit for the cmdlet based on the number of CIM cmdlets that are running on the computer.
       The throttle limit applies only to the current cmdlet, not to the session or to the computer.

   -Timestamps
       Whether to enable timestamps.
       Timestamps facilitate round trip measurement, and can help protect against wrapped sequence numbers
       on high throughput links. For more information about TCP timestamps, see RFC 1323.
       The accepted values are:  Enabled or Disabled

   -Confirm
       Prompt for confirmation before executing the command.

    -WhatIf
       Describe what would happen if you executed the command, without actually executing the command.

Standard Aliases for Set-NetTCPConnection: gs

The Set-NetTCPSetting cmdlet modifies a TCP setting. TCP settings are optimized for different network conditions including latency and congestion. To apply a TCP setting to a port number or destination IP address range, create a transport filter by using the New-NetTransportFilter cmdlet.

Examples

Change the custom TCP setting to have a value of 6 for the initial congestion window and use compound TCP:

PS C:\> Set-NetTCPSetting -SettingName "InternetCustom" -CongestionProvider CTCP -InitialCongestionWindowMss 6

“Trust is the most important part of a relationship, closely followed by communication. I think that if you have those two things, everything else falls into place - your affection, your emotional connection” ~ Vanessa Lachey

Related PowerShell Cmdlets:

Get-NetTCPConnection - Get TCP connections.
Get-NetTransportFilter
Get-NetUDPSetting
New-NetTransportFilter
Remove-NetTransportFilter
Set-NetUDPSetting
Test-Connection - Ping one or more computers.
NETSTAT - Display current TCP/IP network connections and protocol statistics.


 
Copyright © 1999-2021 SS64.com
Some rights reserved