Загрузка данных
$ErrorActionPreference="SilentlyContinue";Write-Host "=== FIX NETWORK + MOUSE + KEYBOARD CLUB ===" -ForegroundColor Cyan;$adapters=Get-NetAdapter|Where-Object{$_.HardwareInterface -eq $true -and $_.Name -notmatch "Wi-Fi|Wireless|Bluetooth|VPN|TAP|Wintun|Virtual|Hyper-V|VMware|VirtualBox"};if(!$adapters){Write-Host "Активный физический Ethernet-адаптер не найден" -ForegroundColor Red}else{foreach($adapter in $adapters){Write-Host "";Write-Host "Адаптер: $($adapter.Name) / $($adapter.InterfaceDescription)" -ForegroundColor Yellow;$pnpId=$adapter.PnPDeviceID;Write-Host "=== Отключение энергосбережения сетевых адаптеров ===" -ForegroundColor Cyan;$powerDevice=Get-CimInstance -Namespace root\wmi -ClassName MSPower_DeviceEnable|Where-Object{$_.InstanceName -like "*$pnpId*"};if($powerDevice){foreach($dev in $powerDevice){try{Set-CimInstance -InputObject $dev -Property @{Enable=$false};Write-Host "Отключено через MSPower_DeviceEnable"}catch{Write-Host "Не удалось через MSPower_DeviceEnable" -ForegroundColor DarkYellow}}}else{Write-Host "MSPower_DeviceEnable для адаптера не найден" -ForegroundColor DarkYellow};try{$regPath="HKLM:\SYSTEM\CurrentControlSet\Enum\$pnpId\Device Parameters";if(Test-Path $regPath){Set-ItemProperty -Path $regPath -Name "PnPCapabilities" -Type DWord -Value 24 -Force;Write-Host "PnPCapabilities выставлен в 24"}else{Write-Host "Registry path Device Parameters не найден" -ForegroundColor DarkYellow}}catch{Write-Host "Не удалось выставить PnPCapabilities" -ForegroundColor DarkYellow};try{powercfg -devicedisablewake "$($adapter.InterfaceDescription)"|Out-Null;Write-Host "Пробуждение от сетевой карты отключено"}catch{Write-Host "Не удалось отключить wake через powercfg" -ForegroundColor DarkYellow};Write-Host "=== Отключение EEE / Green Ethernet / LSO ===" -ForegroundColor Cyan;$patterns=@("Energy Efficient Ethernet","EEE","Green Ethernet","Green","Gigabit Lite","Auto Disable Gigabit","Power Saving Mode","Power Saving","Large Send Offload v2 (IPv4)","Large Send Offload v2 (IPv6)","Large Send Offload","LSO");$props=Get-NetAdapterAdvancedProperty -Name $adapter.Name;foreach($prop in $props){foreach($pattern in $patterns){if($prop.DisplayName -like "*$pattern*"){try{Set-NetAdapterAdvancedProperty -Name $adapter.Name -DisplayName $prop.DisplayName -DisplayValue "Disabled" -NoRestart;Write-Host "Отключено: $($prop.DisplayName)"}catch{try{Set-NetAdapterAdvancedProperty -Name $adapter.Name -DisplayName $prop.DisplayName -RegistryValue 0 -NoRestart;Write-Host "Отключено через RegistryValue 0: $($prop.DisplayName)"}catch{Write-Host "Не удалось отключить: $($prop.DisplayName)" -ForegroundColor DarkYellow}}}}};Write-Host "=== Установка DNS ===" -ForegroundColor Cyan;try{Set-DnsClientServerAddress -InterfaceAlias $adapter.Name -ServerAddresses ("1.1.1.1","8.8.8.8");Write-Host "DNS установлен: 1.1.1.1 / 8.8.8.8"}catch{Write-Host "DNS не удалось установить" -ForegroundColor Red}}};Write-Host "=== Отключение Delivery Optimization ===" -ForegroundColor Cyan;try{New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Force|Out-Null;Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 0;New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" -Force|Out-Null;Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" -Name "DODownloadMode" -Type DWord -Value 0;Write-Host "Delivery Optimization отключена"}catch{Write-Host "Не удалось отключить Delivery Optimization" -ForegroundColor Red};Write-Host "=== Настройка мыши ===" -ForegroundColor Cyan;try{Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseSpeed" -Value "0";Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseThreshold1" -Value "0";Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseThreshold2" -Value "0";Write-Host "Повышенная точность указателя мыши отключена"}catch{Write-Host "Не удалось настроить мышь" -ForegroundColor Red};Write-Host "=== Настройка клавиатуры ===" -ForegroundColor Cyan;try{Set-ItemProperty -Path "HKCU:\Control Panel\Keyboard" -Name "KeyboardDelay" -Value "0";Set-ItemProperty -Path "HKCU:\Control Panel\Keyboard" -Name "KeyboardSpeed" -Value "31";Write-Host "Задержка повтора клавиш: минимум";Write-Host "Скорость повтора клавиш: максимум"}catch{Write-Host "Не удалось настроить клавиатуру" -ForegroundColor Red};Write-Host "=== Очистка DNS-кэша ===" -ForegroundColor Cyan;try{ipconfig /flushdns|Out-Null;Write-Host "DNS-кэш очищен"}catch{Write-Host "Не удалось очистить DNS-кэш" -ForegroundColor DarkYellow};Write-Host "ГОТОВО. Перезагрузи ПК." -ForegroundColor Green