https://github.com/lotusflowr/windows-debloat-automated
Automated modular PowerShell scripts to debloat, optimize, and harden Windows 10 & 11 for personal, enterprise, VM or Autounattend-based installs.
https://github.com/lotusflowr/windows-debloat-automated
autounattend autounattend-xml bloatware bloatware-removal debloat-script gaming modular optimizer powershell-scripts silent windows windows-10 windows-11
Last synced: 2 months ago
JSON representation
Automated modular PowerShell scripts to debloat, optimize, and harden Windows 10 & 11 for personal, enterprise, VM or Autounattend-based installs.
- Host: GitHub
- URL: https://github.com/lotusflowr/windows-debloat-automated
- Owner: lotusflowr
- License: gpl-3.0
- Created: 2025-03-24T06:59:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-02T19:47:15.000Z (about 1 year ago)
- Last Synced: 2025-07-02T20:38:00.024Z (about 1 year ago)
- Topics: autounattend, autounattend-xml, bloatware, bloatware-removal, debloat-script, gaming, modular, optimizer, powershell-scripts, silent, windows, windows-10, windows-11
- Language: PowerShell
- Homepage:
- Size: 257 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🧰 Windows Debloat & Optimization Suite




A fully automated PowerShell toolkit to **debloat**, **optimize**, and **harden Windows** — from install to ready-to-use.
This suite is purpose-built for Autounattend.xml deployments and post-install automation.
All scripts are compatible with tools like [schneegans.de](https://schneegans.de/windows/unattend-generator) for lightweight, one-time execution during OOBE or after first login.
---
## 📦 Script Breakdown
| Script | Purpose | Key Features |
|--------------------------|---------|--------------|
| `SystemSetup.ps1` | Core system tweaks | • Disables telemetry tasks and services
• Activates Ultimate Performance power plan
• Optimizes network and RAM settings
• Configures gaming priorities
• Disables error reporting and ads
• Clears Start menu tiles
• Enables ICMP for network diagnostics |
| `UI_Tweaks.ps1` | User interface optimization | • Removes Widgets and Meet Now
• Configures File Explorer behavior
• Disables News and Interests
• Hardens privacy settings
• Removes Edge desktop shortcut
• Disables telemetry and feedback |
| `SysPrep_Debloater.ps1` | App and feature removal | • Removes provisioned apps (PUWs)
• Uninstalls optional features
• Progress tracking for removals
• Error handling for failed removals
• Safe for Sysprep/FirstLogon |
| `Winget_Apps.ps1` | Package management | • Auto-installs winget and dependencies
• Installs curated app list
• Handles shortcut cleanup
• Validates installations
• Progress tracking |
| `UserSetup.ps1` | User personalization | • Configures keyboard layout
• Sets wallpaper preferences
• Removes startup apps
• Creates network shortcuts
• Downloads system tools
• Activates Windows via [TSForge](https://massgrave.dev/tsforge) |
| `WindowsOptimizer.ps1` | System optimization | • Downloads and runs [Optimizer](https://github.com/hellzerg/optimizer)
• Applies dynamic config based on OS
• Validates downloads
• Implements execution timeout
• Cleans up temporary files |
| `WindowsSpyBlocker.ps1` | Privacy protection | • Downloads [WindowsSpyBlocker](https://github.com/crazy-max/WindowsSpyBlocker)
• Applies telemetry blocklists
• Configures firewall rules
• Cleans up installation files |
| `CTT_Winutil.ps1` | Additional tweaks | • Downloads patched [WinUtil](https://christitus.com/win)
• Applies system tweaks only
• Validates JSON config
• Handles download errors
• Cleans up after execution |
---
## ⚙️ Features
- ✅ Silent execution — no popups
- 🔁 Safe to re-run — idempotent logic
- 🧠 Detects Windows 10 vs 11 automatically
- 🧩 Modular — use only what you need
- 🌐 Pulls community tools: [Optimizer](https://github.com/hellzerg/optimizer), [WinUtil](https://christitus.com/win), [WindowsSpyBlocker](https://github.com/crazy-max/WindowsSpyBlocker)
- 💾 Winget bootstrap + install support
- 🧱 Designed specifically for **Autounattend.xml automation**
- 📝 Detailed logging with progress tracking
- 🛡️ Error handling and validation throughout
- 🔄 Progress tracking for long operations
---
## 🚀 Usage
You can run scripts manually, chain them in SetupComplete/FirstLogon, or automate via OOBE using:
> 💡 [schneegans.de](https://schneegans.de/windows/unattend-generator/)
> Use it to schedule **one-time execution** of PowerShell scripts during the first user login — no registry or Task Scheduler changes required.
> Perfect for `Autounattend.xml` deployments.
**Suggested execution order**:
```
SystemSetup.ps1 → SYSTEM-level baseline tweaks
UI_Tweaks.ps1 → UI, taskbar, privacy, and startup cleanup
SysPrep_Debloater.ps1 → Remove built-in apps and features
Winget_Apps.ps1 → Install app stack (auto-installs winget if needed)
UserSetup.ps1 → Per-user personalization
WindowsOptimizer.ps1 → Full Optimizer pass with embedded config
WindowsSpyBlocker.ps1 → Apply telemetry blocklists
CTT_Winutil.ps1 → Additional system tweaks
```
### 📦 Autounattend Integration
This project includes and supports a fully configured `Autounattend.xml` for hands-free deployment.
You can use [schneegans.de's Unattended Generator](https://schneegans.de/windows/unattend-generator/) to modify or inspect the unattended configuration.
To apply this to your install media, simply place the provided [`Autounattend.xml`](./autounattend.xml) at the root of a bootable Windows ISO or USB
You can find a copy of the example [`Autounattend.xml`](./autounattend.xml) in this repository.
More info in the [Wiki/Autounattend-Integration](https://github.com/lotusflowr/windows-debloat-automated/wiki/Autounattend-Integration).
## 📌 Requirements
- 💻 Windows 10 or 11 (22H2+ recommended)
- 🌐 Internet required for Optimizer, WinUtil, SpyBlocker, and winget
- 🛠 PowerShell 5.1+
- 🔓 If running from a PowerShell window, use: `powershell.exe -ExecutionPolicy Bypass -File .\ScriptName.ps1`
---
## 🤝 Credits
- [Optimizer by hellzerg](https://github.com/hellzerg/optimizer)
- [WinUtil by Chris Titus Tech](https://github.com/ChrisTitusTech/winutil)
- [WindowsSpyBlocker by crazy-max](https://github.com/crazy-max/WindowsSpyBlocker)
- [schneegans.de](https://schneegans.de/windows/unattend-generator)
---
## ⚠️ Disclaimers
- Always test this suite in a virtual machine (VM) or disposable environment before deploying it to production or real hardware.
- ⚠️ : UserSetup.ps1 includes Windows activation via [TSForge](https://massgrave.dev/tsforge) - review and remove if not suitable for your environment.
- These scripts apply deep system-level changes and may behave differently depending on your Windows version, edition, or configuration. Make sure to create backups before attempting any changes.
- Internet connectivity is required for several features. However, you can definitely adapt them to make them run offline.
- Most inline comments in the scripts and this wiki were generated using ChatGPT and may be incomplete or slightly inaccurate.
> Feedback and forks welcome — this is an evolving deployment suite.