Created
February 21, 2018 16:21
-
-
Save PFortin93/2e9028a820daad22d49b3021d09aefd6 to your computer and use it in GitHub Desktop.
A script to configure network adapters to align with this blog post: http://lifeofageekadmin.com/network-performance-vmxnet3-windows-server-2012-r2/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Fixes Network performance issues on certain Windows Server VMs when under CPU contention | |
| #Set global settings | |
| $adapters = @() | |
| netsh int tcp set global chimney=Disabled | |
| netsh int tcp set global autotuninglevel=Disabled | |
| netsh int tcp set supplemental custom congestionprovider=none | |
| netsh int tcp set global ecncapability=Disabled | |
| netsh int ip set global taskoffload=disabled | |
| netsh int tcp set global timestamps=Disabled | |
| netsh int tcp set global RSS=Enable | |
| netsh int tcp set global rsc=disabled | |
| #Get list of network adapters for loop | |
| $adapters = Get-NetAdapter -Name "Etherne*" |select name | |
| #Set adapter specific settings for each adapter | |
| foreach ($adapter in $adapters) { | |
| Set-NetAdapterAdvancedProperty $adapter.name -DisplayName "Large Send Offload V2 (IPv4)" -DisplayValue "Disabled" -NoRestart | |
| Set-NetAdapterAdvancedProperty $adapter.name -DisplayName "Large Send Offload V2 (IPv6)" -DisplayValue "Disabled" -NoRestart | |
| Set-NetAdapterAdvancedProperty $adapter.name -DisplayName ” IPv4 Checksum Offload ” -DisplayValue “Disabled” -NoRestart | |
| Set-NetAdapterAdvancedProperty $adapter.name -DisplayName ” IPv4 TSO Offload ” -DisplayValue “Disabled” –NoRestart | |
| Set-NetAdapterAdvancedProperty $adapter.name -DisplayName “Large Send Offload V2 (IPv4)” -DisplayValue “Disabled” -NoRestart | |
| Set-NetAdapterAdvancedProperty $adapter.name -DisplayName “Large Send Offload V2 (IPv6)” -DisplayValue “Disabled” –NoRestart | |
| Set-NetAdapterAdvancedProperty $adapter.name -DisplayName ” Offload IP Options ” -DisplayValue “Disabled” -NoRestart | |
| Set-NetAdapterAdvancedProperty $adapter.name -DisplayName ” Offload tagged traffic ” -DisplayValue “Disabled” –NoRestart | |
| Set-NetAdapterAdvancedProperty $adapter.name -DisplayName ” Offload TCP Options ” -DisplayValue “Disabled” -NoRestart | |
| Set-NetAdapterAdvancedProperty $adapter.name -DisplayName ” Recv Segment Coalescing(IPV4)” -DisplayValue “Disabled” –NoRestart | |
| Set-NetAdapterAdvancedProperty $adapter.name -DisplayName ” Recv Segment Coalescing(IPV6)” -DisplayValue “Disabled” -NoRestart | |
| Set-NetAdapterAdvancedProperty $adapter.name -DisplayName ” TCP Checksum Offload (IPv4)” -DisplayValue “Disabled” –NoRestart | |
| Set-NetAdapterAdvancedProperty $adapter.name -DisplayName ” TCP Checksum Offload (IPv6)” -DisplayValue “Disabled” -NoRestart | |
| Set-NetAdapterAdvancedProperty $adapter.name -DisplayName ” UDP Checksum Offload(IPv4)” -DisplayValue “Disabled” –NoRestart | |
| Set-NetAdapterAdvancedProperty $adapter.name -DisplayName ” UDP Checksum Offload(IPv6)” -DisplayValue “Disabled” -NoRestart | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment