distortedvision
Well-Known Member
- Joined
- Jun 18, 2022
- Messages
- 61
- Thread Author
- #21
Mike: That is the result of the script that you posted in #18
The issue is not resolved. I need to abort as I have to study for exams.
# Minimal safe NIC tweak script - run as Administrator
$Adapter = "Ethernet"
function Set-IfExists {
param(
[string]$Name,
[string]$Value
)
$prop = Get-NetAdapterAdvancedProperty -Name $Adapter -ErrorAction SilentlyContinue |
Where-Object { $_.DisplayName -eq $Name }
if ($null -ne $prop) {
try {
Set-NetAdapterAdvancedProperty -Name $Adapter -DisplayName $Name -DisplayValue $Value -ErrorAction Stop
Write-Host "OK: Set '$Name' -> '$Value'"
} catch {
Write-Warning "FAIL: Could not set '$Name' -> '$Value' : $($_.Exception.Message)"
}
} else {
Write-Host "SKIP: Property not found: $Name"
}
}
Write-Host "Running NIC adjustments on adapter: $Adapter" -ForegroundColor Cyan
# Re-enable Windows TCP autotuning
try {
netsh int tcp set global autotuninglevel=normal | Out-Null
Write-Host "OK: TCP autotuninglevel set to normal"
} catch {
Write-Warning "Could not set TCP autotuninglevel: $($_.Exception.Message)"
}
# Disable power/energy throttling options
Set-IfExists -Name "Energy-Efficient Ethernet" -Value "Disabled"
Set-IfExists -Name "Green Ethernet" -Value "Disabled"
Set-IfExists -Name "Gigabit Lite" -Value "Disabled"
Set-IfExists -Name "Power Saving Mode" -Value "Disabled"
Set-IfExists -Name "EEE Max Support Speed" -Value "Disabled"
# Disable LSO (Large Send Offload) - common culprit
Set-IfExists -Name "Large Send Offload v2 (IPv4)" -Value "Disabled"
Set-IfExists -Name "Large Send Offload v2 (IPv6)" -Value "Disabled"
Set-IfExists -Name "Large Send Offload (IPv4)" -Value "Disabled"
Set-IfExists -Name "Large Send Offload (IPv6)" -Value "Disabled"
# Increase buffers (attempt)
Set-IfExists -Name "Receive Buffers" -Value "8192"
Set-IfExists -Name "Transmit Buffers" -Value "8192"
# Keep Flow Control enabled
Set-IfExists -Name "Flow Control" -Value "Rx & Tx Enabled"
# Other sensible defaults
Set-IfExists -Name "Interrupt Moderation" -Value "Enabled"
Set-IfExists -Name "Speed & Duplex" -Value "Auto Negotiation"
Set-IfExists -Name "Jumbo Frame" -Value "Disabled"
# Restart the adapter (brief disconnect)
Write-Host "Restarting adapter $Adapter..." -ForegroundColor Yellow
try {
Disable-NetAdapter -Name $Adapter -Confirm:$false -ErrorAction Stop
Start-Sleep -Seconds 3
Enable-NetAdapter -Name $Adapter -Confirm:$false -ErrorAction Stop
Start-Sleep -Seconds 3
Write-Host "Adapter restart complete." -ForegroundColor Green
} catch {
Write-Warning "Adapter restart failed: $($_.Exception.Message)"
}
# Show verification
Write-Host "`nCurrent adapter advanced properties:" -ForegroundColor Cyan
Get-NetAdapterAdvancedProperty -Name $Adapter | Select-Object DisplayName, DisplayValue | Format-Table -AutoSize
Write-Host "`nCurrent netsh TCP globals:" -ForegroundColor Cyan
netsh interface tcp show global
Oh you're so clever now