Win11Debloat

命令行工具

Raphire/Win11Debloat

用于移除预装应用和禁用遥测的 PowerShell 脚本。

项目简介

Win11Debloat 是一款轻量级 PowerShell 脚本,用于移除预装应用、禁用遥测和侵扰性界面元素,并自定义 Windows 设置。它支持交互式和命令行两种模式,适用于 Windows 10 和 11,所有更改均可轻松还原。

README 预览

# Win11Debloat\n\n[](https://github.com/Raphire/Win11Debloat/releases/latest)\n[](https://github.com/Raphire/Win11Debloat/discussions)\n[](https://github.com/Raphire/Win11Debloat/wiki/)\n\n Win11Debloat is a lightweight, easy to use PowerShell script that allows you to quickly declutter and customize your Windows experience, no installation required! You can use it to remove pre-installed apps, disable telemetry, remove intrusive interface elements and much more. No need to painstakingly go through all the settings yourself or remove apps one by one. Win11Debloat makes the process quick and easy!\n\nThe script also includes many features that system administrators and power users will enjoy. Such as a powerful command-line interface, support for Windows Audit mode and the ability to make changes to other Windows users. Please refer to our [wiki](https://github.com/Raphire/Win11Debloat/wiki/) for more details.\n\n\n\n#### Did this script help you? Please consider buying me a cup of coffee to support my work\n\n[](https://ko-fi.com/M4M5C6UPC)\n\n## Usage\n\n> [!Warning]\n> Great care went into making sure this script does not unintentionally break any OS functionality, but use at your own risk! If you run into any issues, please report them [here](https://github.com/Raphire/Win11Debloat/issues).\n\n### Quick method\n\nDownload & run the script automatically via PowerShell.\n\n1. Open PowerShell or Terminal, preferably as an administrator.\n2. Copy and paste the command below into PowerShell:\n\n```PowerShell\n& ([scriptblock]::Create((irm "https://debloat.raphi.re/")))\n```\n\n3. Wait for the script to automatically download Win11Debloat.\n4. Carefully read through and follow the on-screen instructions.\n\nThis method supports command-line parameters to customize the behaviour of the script. Please click [here](https://github.com/Raphire/Win11Debloat/wiki/Command%E2%80%90line-Interface#parameters) for more information.\n\n### Traditional method\n\n\n  Manually downloa

常见问题 (3)

故障排除
如何修复在 Windows 11 上应用更改时出现的 Microsoft.PowerShell.Security Get-Acl 错误?

作为临时解决方法,请选择 Default 模式,点击 Back,取消选中 "Disable Microsoft Store app suggestions in search" 选项,点击 Next,然后应用更改。之后脚本应该能够完成。该问题已通过为 Set-StoreSearchSuggestionsDisabled 中的 Get-Acl 添加错误处理得到解决,因此将脚本更新到最新版本是永久性的修复方法。

来源 Issue #738
故障排除
如何修复 Win11Debloat 中的 "Unknown feature 'DisableSearchHighlights' could not be applied" 错误?

-DisableSearchHistory 和 -DisableSearchHighlights 在其条目从 Config/Features.json 中被移除后已被弃用,随后已从 Win11Debloat 中完全移除。请更新到最新版本,并从命令中移除这两个开关,例如:使用 ./Win11Debloat.ps1,不要加 -DisableSearchHistory 或 -DisableSearchHighlights。在旧版本中,该警告表示开关会被接受,但相应功能不会生效,并会被计为一次失败的更改;这两个开关可以安全地省略。旧的 .reg 文件不受支持,不应依赖使用。

来源 Issue #798
故障排除
为什么在文件资源管理器中隐藏"主页"后,固定或取消固定的"快速访问"文件夹不会立即更新?

这是 Windows 的一个副作用:Quick Access 与 Home 节点紧密集成,因此隐藏 Home 可能会阻止 File Explorer 实时刷新固定的项目。debloat 脚本没有永久性的修复方法。变通方法:1) 禁用 "Hide 'Home' from navigation pane" 选项并重新应用脚本;或 2) 在固定/取消固定后运行以下命令重启 Explorer:taskkill /f /im explorer.exe; start explorer.exe。只有在 Home 保持隐藏的情况下重启 Explorer 后,更改才会生效。

来源 Issue #761