跳到主要内容

懒人方案解决90%系统设置问题

指令使用 ChatGPT / DeepSeek 与xk整合而来,转载请保留!

鼠标点击下方代码块下拉,点击右侧 粉色按钮 - 复制到剪贴板, 右键 点击左下角 Windows 开始菜单 - 点击 终端管理员(Windows PowerShell [管理员]) ,右键点击黑色窗口 - 仍然粘贴,再按下回车,之后关闭即可 (包含禁用edge浏览器的下载检查,手动关闭浏览器生效)

Set-MpPreference -DisableRealtimeMonitoring $true; 
Set-MpPreference -MAPSReporting 0;
reg add "HKLM\SYSTEM\CurrentControlSet\Control\CI\Policy" /v "VerifiedAndReputablePolicyState" /t REG_DWORD /d 0 /f;
Set-SmbClientConfiguration -RequireSecuritySignature $false -Force;
Set-ProcessMitigation -System -Disable CFG;
Set-ProcessMitigation -System -Disable DEP;
Set-ProcessMitigation -System -Disable EmulateAtlThunks;
Set-ProcessMitigation -System -Disable ForceRelocateImages;
Set-ProcessMitigation -System -Disable BottomUp;
Set-ProcessMitigation -System -Disable HighEntropy;
Set-ProcessMitigation -System -Disable SEHOP;
Set-ProcessMitigation -System -Disable StrictHandle;
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Network Protection" -Name "EnableNetworkProtection" -Value 0 -Force;
Set-MpPreference -DisableBlockAtFirstSeen $true;
Set-MpPreference -DisableIOAVProtection $true;
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "EnableSmartScreen" -Value 0;
bcdedit /set hypervisorlaunchtype off;
reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v "Enabled" /t REG_DWORD /d 0 /f;
reg add "HKLM\SYSTEM\CurrentControlSet\Control\CI\Config" /v "VulnerableDriverBlocklistEnable" /t REG_DWORD /d 0 /f;
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Value 0;
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableLUA" /t REG_DWORD /d 0 /f;
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Edge\SmartScreenEnabled" -Name "SmartScreenEnabled" -Value 0 -Type DWord;
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Edge\SmartScreenPuaEnabled" -Name "SmartScreenPuaEnabled" -Value 0 -Type DWord;
reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "SmartScreenEnabled" /t REG_DWORD /d 0 /f;
reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "SmartScreenPuaEnabled" /t REG_DWORD /d 0 /f;
reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "PreventSmartScreenPromptOverride" /t REG_DWORD /d 0 /f;
powercfg -h off;
if ([System.Security.Principal.WindowsIdentity]::GetCurrent().Name -match '[\u4e00-\u9fa5\uff00-\uffef]') { "系统用户名含中文,部分菜单可能出现问题" } else { "" };
if ((Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecureBoot\State").UEFISecureBootEnabled -eq 0) { "电脑为传统 BIOS 方案,部分内核菜单可能无法使用" } else { "" };
sc.exe stop vgk;
sc.exe stop vgc;
Write-Host "已完成所有禁用/检查方案" -ForegroundColor Red

此指令包含:关闭 Windows 安全中心里的大部分功能;禁用 Edge 浏览器下载检查;关闭快速启动;关闭虚拟机;设置系统时间同步;检查用户名是否为中文;检查 BIOS 是否为 UEFI 等等(此代码用来解决大部分设置问题);报红也无所谓;在此基础上再查看本教程网的彻底关闭杀毒 疑难杂症等解决方式