# 6. Disable Wi-Fi Sense / Hotspot Sharing (privacy & performance) reg add "HKLM\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" /v value /t REG_DWORD /d 0 /f > $null 2>&1 reg add "HKLM\Software\Microsoft\WcmSvc\wifinetworkmanager\config" /v AutoConnectAllowedOEM /t REG_DWORD /d 0 /f > $null 2>&1 Write-Host "[+] Wi-Fi Sense and hotspot sharing disabled" -ForegroundColor Green
Write-Host "=== WLAN Optimizer for Windows 11 ===" -ForegroundColor Cyan wlan optimizer windows 11
# 2. Set Wi-Fi adapter to High Performance via power scheme powercfg -setactive SCHEME_MIN powercfg -setacvalueindex SCHEME_CURRENT 19cbb8fa-5279-450e-9fac-8a3d5fedd0c1 12bbebe6-58d6-4636-95bb-3217ef867c1a 0 powercfg -setdcvalueindex SCHEME_CURRENT 19cbb8fa-5279-450e-9fac-8a3d5fedd0c1 12bbebe6-58d6-4636-95bb-3217ef867c1a 0 powercfg -setactive SCHEME_CURRENT Write-Host "[+] High performance power plan applied to wireless adapter" -ForegroundColor Green Set TCP auto-tuning to normal netsh int tcp
# 5. Set TCP auto-tuning to normal netsh int tcp set global autotuninglevel=normal > $null 2>&1 Write-Host "[+] TCP auto-tuning set to normal" -ForegroundColor Green Disable RSC (Receive Segment Coalescing) for Wi-Fi foreach
# 8. Flush DNS and reset Winsock ipconfig /flushdns > $null 2>&1 netsh winsock reset > $null 2>&1 Write-Host "[+] DNS cache flushed, Winsock reset" -ForegroundColor Green
# 4. Disable QoS (Quality of Service) for Wi-Fi Set-NetQosPolicy -Name "WLAN Optimizer Disable QoS" -NetworkProfile All -ThrottleRate -1 -ErrorAction SilentlyContinue Write-Host "[+] QoS throttling removed" -ForegroundColor Green
# 7. Disable RSC (Receive Segment Coalescing) for Wi-Fi foreach ($adapter in $wlanAdapters) Disable-NetAdapterRsc -Name $adapter.Name -ErrorAction SilentlyContinue Write-Host "[+] RSC disabled for $($adapter.Name)" -ForegroundColor Green