# Win11Debloat User Guide

Win11Debloat is a lightweight PowerShell script that declutters and customizes Windows 11 (and Windows 10). It removes pre-installed bloatware apps, disables telemetry and advertising, strips intrusive interface elements, and applies dozens of quality-of-life tweaks — all from a single graphical window or command-line session, without you having to dig through Settings or uninstall apps one at a time.

This guide shows you how to install and run the tool, walks through every option in the interface, documents every command-line parameter and tweak, and explains how to revert any change you make.

> [!NOTE]
> Win11Debloat works by applying Windows registry changes (shipped as `.reg` files), removing app packages, and toggling optional Windows features. It does **not** install anything in the background, phone home, or require an internet connection beyond the initial download.

---

## 1. Quick Start

The fastest way to run Win11Debloat is to launch it directly from PowerShell.

1. Open **PowerShell** or **Windows Terminal** — preferably as an Administrator.
2. Paste this command and press Enter:

```powershell
& ([scriptblock]::Create((irm "https://debloat.raphi.re/")))
```

3. Wait a few seconds while the script downloads.
4. Accept the Administrator (UAC) prompt if asked.
5. Read the on-screen options and follow along.

```text
             Win11Debloat is launching...
               Leave this window open
```

That's it. The graphical window opens (or the text menu, if your system can't display the window), and nothing is changed until you explicitly apply your selection.

> [!TIP]
> If you are not running as Administrator, the script detects this and offers to relaunch itself elevated: `Restart as Administrator? (y/n)`. Answer `y` to continue.

> [!IMPORTANT]
> Win11Debloat must run as Administrator. Without elevation it cannot modify the registry, remove provisioned apps, or apply changes for other users, and it will exit after printing `Win11Debloat must be run as Administrator.`

---

## 2. Requirements

| Requirement | Detail |
|---|---|
| Operating system | Windows 11 (all features) or Windows 10 (most features; some are Windows 11-only) |
| Privileges | **Administrator** — required for every run |
| PowerShell | Windows PowerShell 5.1 (built in) or PowerShell 7+ |
| PowerShell language mode | **Full Language** mode. The script exits if execution is locked down by security policy (Constrained Language Mode). |
| WinGet | Recommended. Needed to remove **OneDrive** and **Microsoft Edge**. Other apps are removed without it. |
| Internet | Only for the initial download (Quick method). The extracted script runs fully offline. |

> [!NOTE]
> Win11Debloat checks for these prerequisites at startup. If WinGet is missing or outdated you'll see a warning (`WinGet is not installed or outdated, this may prevent Win11Debloat from removing certain apps`) and a prompt to continue anyway.

---

## 3. Installation & Launch

There are three ways to start the tool. All of them open the same interface.

=== "Quick method (recommended)"

    Download and run automatically via PowerShell. This always fetches the latest version.

    1. Open PowerShell or Windows Terminal, preferably as an Administrator.
    2. Run:

        ```powershell
        & ([scriptblock]::Create((irm "https://debloat.raphi.re/")))
        ```

    3. Follow the on-screen instructions.

    This method accepts command-line parameters — see [Section 9](#9-running-from-the-command-line).

=== "Traditional method"

    Manually download and double-click to run.

    1. [Download the latest release](https://github.com/Raphire/Win11Debloat/releases/latest) and extract the `.ZIP` to a folder of your choice.
    2. Open the `Win11Debloat` folder.
    3. Double-click **`Run.bat`**.
    4. Accept the Windows UAC prompt.

    `Run.bat` launches the script in Windows Terminal if it is installed, otherwise in classic PowerShell, and always requests elevation for you.

    > [!WARNING]
    > If the console window opens and immediately closes with nothing happening, use the Advanced method below instead.

=== "Advanced method"

    Manually download, then run the script directly. Recommended for power users.

    1. [Download the latest release](https://github.com/Raphire/Win11Debloat/releases/latest) and extract the `.ZIP`.
    2. Open PowerShell or Windows Terminal **as an Administrator**.
    3. Temporarily allow script execution for this session only:

        ```powershell
        Set-ExecutionPolicy Unrestricted -Scope Process -Force
        ```

    4. Change to the folder you extracted to:

        ```powershell
        cd C:\Win11Debloat
        ```

    5. Run the script:

        ```powershell
        .\Win11Debloat.ps1
        ```

    This method also accepts command-line parameters — see [Section 9](#9-running-from-the-command-line).

> [!CAUTION]
> Do not run Win11Debloat from inside the **Windows Terminal** app if you intend to *remove* Windows Terminal. Doing so closes the window that the script is running in and aborts it mid-process. Run it from classic PowerShell in that case.

---

## 4. How a Run Works

Whichever way you launch it, a Win11Debloat run follows the same safe sequence:

1. **You choose** what to remove and which tweaks to apply (via the window or the text menu).
2. **You review** a summary of pending changes. Nothing has changed yet.
3. **You confirm** (click *Apply* in the GUI, or press Enter in the CLI).
4. Win11Debloat creates a **registry backup** of every value it is about to touch (saved to a `Backups` folder next to the script).
5. If you asked for it, a **System Restore point** is created.
6. Each selected change is applied, with live progress.
7. **File Explorer is restarted** so the changes take effect immediately (you may see your screen flicker).

> [!IMPORTANT]
> Changes are only made after you confirm. Up to that point you can close the window or press `CTRL+C` to quit without modifying anything.

> [!TIP]
> Every registry tweak ships with a matching "undo" file, and Win11Debloat saves a backup of the prior state before applying. See [Section 11 — Reverting Changes](#11-reverting-changes) to roll anything back.

---

## 5. Using the Graphical Interface

When you launch Win11Debloat normally (no parameters), it opens a window titled **Win11Debloat** with four tabs and a menu in the title bar.

```text
┌─ Win11Debloat ─────────────────────────────── [Menu] ─ _ □ X ─┐
│  [ Home ] [ App Removal ] [ Tweaks ] [ Deployment Settings ]   │
│                                                                │
│   ...tab content...                                            │
│                                              [ Apply changes ] │
└────────────────────────────────────────────────────────────────┘
```

### 5.1 The tabs

| Tab | What you do here |
|---|---|
| **Home** | See an overview of every change currently selected across all tabs before you apply. |
| **App Removal** | Pick which pre-installed apps to uninstall. Each app shows a name, description, package ID, and a colored recommendation dot. |
| **Tweaks** | Toggle privacy, system, taskbar, File Explorer, AI, update, and appearance settings, grouped by category. |
| **Deployment Settings** | Choose who changes apply to (current user, another user, or new-user defaults), whether to create a restore point, and whether to restart Explorer. |

### 5.2 The title-bar menu

| Menu item | Action |
|---|---|
| **Import config** | Load a previously saved `.json` configuration and pre-fill all your selections. |
| **Export config** | Save your current selections to a `.json` file you can reuse or share (great for repeat installs). |
| **Restore backup** | Roll back a previous run using one of the automatic registry backups. |
| **Documentation** | Open the project wiki in your browser. |
| **Report a bug** | Open the issue tracker. |
| **Logs** | Open the folder containing run logs. |
| **About** | Show the version and credits. |

### 5.3 App recommendation dots

In the **App Removal** tab, each app carries a recommendation that tells you how safe it is to remove:

| Dot | Recommendation | Meaning |
|---|---|---|
| 🟢 | `safe` | Safe to remove for most users (bloatware, games, discontinued apps). |
| 🟡 | `optional` | Useful to some people — remove only if you don't use it (e.g. Calculator, Notepad, Photos, Phone Link). |
| 🔴 | `unsafe` | Removing may break Windows features. Win11Debloat asks you to confirm before removing these (e.g. Microsoft Store, Windows Terminal, Xbox Identity Provider). |

> [!WARNING]
> Removing a `🔴 unsafe` app can have side effects. For example, removing **Xbox Identity Provider** can prevent signing into a Microsoft or Xbox account, and removing **Microsoft Store** makes it very hard to reinstall other apps later. Read the description before checking these.

> [!NOTE]
> If the WPF window cannot load (for example on Windows Server core or a restricted environment), Win11Debloat automatically falls back to the command-line menu described next: `Unable to load WPF GUI (not supported in this environment), falling back to CLI mode`.

---

## 6. Using the Command-Line Menu

When you run with a deployment parameter, or when the graphical window can't load, Win11Debloat presents a text menu:

```text
-------------------------------------------------------------------------------------------
 Win11Debloat Script - Menu (User: YourName)
-------------------------------------------------------------------------------------------
(1) Default mode: Quickly apply the recommended changes
(2) App removal mode: Select & remove apps, without making other changes
(3) Quickly apply your last used settings
```

| Option | What it does |
|---|---|
| **1 — Default mode** | Applies the recommended privacy/quality tweaks plus an app-removal choice. |
| **2 — App removal mode** | Opens the app picker only; makes no other changes. |
| **3 — Last used settings** | Re-applies the exact selection from your previous run. **Only shown if you have run the tool before** (a `LastUsedSettings.json` file exists). |

### 6.1 Default mode app choices

After choosing Default mode you're asked which apps to remove:

```text
Options:
 (n) Don't remove any apps
 (1) Only remove the default selection of apps
 (2) Manually select which apps to remove
Do you want to remove any apps? Apps will be removed for all users (n/1/2)
```

- **n** — apply tweaks only, keep all apps.
- **1** — remove the curated default app list (includes Teams, Spotify, Sticky Notes, OEM bloat, and more).
- **2** — open the app picker to choose exactly what gets removed.

### 6.2 Reviewing pending changes

Before anything is applied, Win11Debloat prints the full list and waits for you:

```text
Win11Debloat will make the following changes:
- Create a system restore point
- Remove 23 apps:
  ...
- Disable telemetry, tracking & targeted ads
- Disable tips, tricks & suggested content throughout Windows
...

Press enter to execute the script or press CTRL+C to quit...
```

> [!TIP]
> Pressing `CTRL+C` at this prompt exits without changing anything. This is your last chance to back out.

---

## 7. Choosing Which Apps to Remove

Win11Debloat ships with a curated catalog of removable apps in its `Config/Apps.json` file. You select from this catalog in the App Removal tab/picker, or target it from the command line.

### 7.1 The default selection

When you choose "default" app removal, the apps marked as default in the catalog are removed. This includes Microsoft first-party bloat, sponsored third-party apps, OEM tools, and games. Notable defaults include:

- **Microsoft / Bing:** Clipchamp, Cortana, all Bing apps (News, Weather, Finance, etc.), Copilot, Microsoft Teams (old & new), Office Hub, Power Automate, Solitaire Collection, Sticky Notes, Mixed Reality Portal, 3D Builder/Viewer, Sway, To Do, Get Started, Feedback Hub, Maps, Sound Recorder, Movies & TV, Family Safety, Quick Assist, PC Manager.
- **Third-party / sponsored:** Spotify, TikTok, Facebook, Instagram, Twitter (X), LinkedIn, Netflix, Prime Video, Hulu, Disney, Candy Crush (all), Spotify, Adobe Photoshop Express, Amazon, Disney Magic Kingdoms, and many casual games.

### 7.2 Apps NOT removed by default

These are kept unless you explicitly select them, because many people use them:

`Calculator`, `Camera`, `Notepad`, `Paint`, `Photos`, `Snipping Tool`, `Media Player`, `Phone Link`, `Remote Desktop`, `Whiteboard`, `Outlook for Windows`, `OneDrive`, `Mail & Calendar`, `People`, `Bing Search`, `Xbox Gaming App`, the Xbox overlays, OEM apps from HP/Dell/Lenovo, and others. (See the full recommendation in the App Removal tab.)

### 7.3 App removal presets

The catalog defines convenience presets you can apply with one click in the App Removal tab:

| Preset | Removes |
|---|---|
| **Xbox Gaming apps** | Xbox Gaming App, Xbox Game Overlay, Xbox Gaming Overlay |
| **OEM software (Dell, HP, Lenovo)** | The full set of HP, Dell, and Lenovo OEM utilities and support apps |

### 7.4 Built-in app-removal shortcuts

These are exposed both as command-line switches and (where relevant) buttons. Each removes a fixed group of apps:

| Action | Removes |
|---|---|
| `RemoveCommApps` | Mail, Calendar, and People |
| `RemoveW11Outlook` | The new Outlook for Windows app |
| `RemoveGamingApps` | Xbox App, Xbox Game Overlay, Xbox Gaming Overlay |
| `RemoveHPApps` | All HP OEM applications |

> [!NOTE]
> **OneDrive** and **Microsoft Edge** are special: they are removed using WinGet (not as normal app packages). If WinGet can't remove Edge, Win11Debloat offers a forceful uninstall as a last resort — see the [Edge FAQ](#13-faq).

---

## 8. Tweaks Reference

Every tweak below can be toggled in the **Tweaks** tab or applied directly with the matching command-line switch (Section 9). Tweaks are grouped exactly as they appear in the interface. Tweaks that require a specific Windows version only appear when your build supports them.

### 8.1 Privacy & Suggested Content

| Tweak (switch) | What it does |
|---|---|
| `DisableTelemetry` | Disables telemetry, diagnostic data, activity history, app-launch tracking, and targeted ads. |
| `DisableSuggestions` | Removes tips, tricks, suggested content, and auto-installed suggested apps throughout Windows. |
| `DisableLocationServices` | Turns off Windows location services and app location access. |
| `DisableFindMyDevice` | Turns off Find My Device location tracking. |
| `DisableLockscreenTips` | Removes tips, tricks, and fun facts from the lock screen. |
| `DisableDesktopSpotlight` | Turns off the Windows Spotlight rotating desktop background. |
| `DisableEdgeAds` | Disables ads, suggestions, and the MSN news feed in Microsoft Edge. |
| `DisableSettings365Ads` | Hides Microsoft 365 Copilot ads in the Settings Home page. |

### 8.2 AI

| Tweak (switch) | What it does | Min. build |
|---|---|---|
| `DisableCopilot` | Disables and uninstalls Microsoft Copilot. | 22621 |
| `DisableRecall` | Disables Windows Recall. | 22621 |
| `DisableClickToDo` | Disables Click To Do AI text & image analysis. | 22621 |
| `DisableAISvcAutoStart` | Stops the AI service (`WSAIFabricSvc`) from starting automatically. | 22621 |
| `DisableEdgeAI` | Disables AI features in Microsoft Edge. | 22621 |
| `DisablePaintAI` | Disables AI features in Paint. | 22621 |
| `DisableNotepadAI` | Disables AI features in Notepad. | 22621 |

### 8.3 Start Menu & Search

| Tweak (switch) | What it does | Build |
|---|---|---|
| `ClearStart` | Removes all pinned apps from the Start menu (current user). | 22621+ |
| `ClearStartAllUsers` | Removes all pinned apps for all existing and new users. | 22621+ |
| `ReplaceStart` | Replaces the Start menu layout with a provided template file (current user). | 22621+ |
| `ReplaceStartAllUsers` | Replaces the Start menu layout for all users with a template. | 22621+ |
| `DisableStartRecommended` | Hides the "Recommended" section in the Start menu. | 22621+ |
| `DisableStartAllApps` | Hides the "All apps" section in the Start menu. | 26200+ |
| `DisableStartPhoneLink` | Removes Phone Link integration from the Start menu. | 22621+ |
| `DisableBing` | Disables Bing web search & Copilot integration in Windows Search (also removes the Bing Search app). | — |
| `DisableStoreSearchSuggestions` | Disables Microsoft Store app suggestions in search. | 22621+ |

### 8.4 Taskbar

| Tweak (switch) | What it does | Build |
|---|---|---|
| `TaskbarAlignLeft` | Aligns taskbar icons to the left (Windows 10 style). | 22000+ |
| `HideSearchTb` / `ShowSearchIconTb` / `ShowSearchLabelTb` / `ShowSearchBoxTb` | Choose the taskbar search style: hidden, icon, icon+label, or full search box. | 22000+ |
| `HideTaskview` | Hides the Task View button. | 22000+ |
| `DisableWidgets` | Disables widgets on the taskbar and lock screen (removes the widget app packages). | — |
| `HideChat` | Hides the Chat (Meet Now) icon. | ≤ 22621 |
| `EnableEndTask` | Adds an "End Task" option to the taskbar right-click menu. | 22631+ |
| `EnableLastActiveClick` | Clicking a taskbar app switches to its last active window. | 22000+ |
| `CombineTaskbarAlways` / `WhenFull` / `Never` | Combine taskbar buttons on the main display. | 22000+ |
| `CombineMMTaskbarAlways` / `WhenFull` / `Never` | Combine taskbar buttons on secondary displays. | 22000+ |
| `MMTaskbarModeAll` / `MainActive` / `Active` | Where app icons appear when using multiple monitors. | 22000+ |

### 8.5 System

| Tweak (switch) | What it does | Build | Reboot |
|---|---|---|---|
| `DisableDragTray` | Disables the file-sharing "Drag Tray" at the top of the screen. | 26200+ | |
| `RevertContextMenu` | Restores the classic Windows 10 right-click context menu. | 22000+ | |
| `DisableMouseAcceleration` | Turns off Enhance Pointer Precision (mouse acceleration). | — | ✓ |
| `DisableStickyKeys` | Stops the Sticky Keys prompt on pressing Shift 5×. | 26100+ | ✓ |
| `DisableStorageSense` | Disables automatic disk cleanup. | 22000+ | |
| `DisableFastStartup` | Disables Fast Start-up for a full shutdown. | — | |
| `DisableBitlockerAutoEncryption` | Turns off automatic BitLocker device encryption. | 22000+ | |
| `DisableModernStandbyNetworking` | Disables network connectivity during sleep to save battery. | 22000+ | |

### 8.6 File Explorer

| Tweak (switch) | What it does |
|---|---|
| `ShowKnownFileExt` | Shows file extensions for known file types. |
| `ShowHiddenFolders` | Shows hidden files, folders, and drives. |
| `ExplorerToHome` / `ExplorerToThisPC` / `ExplorerToDownloads` / `ExplorerToOneDrive` | Choose where File Explorer opens by default. |
| `HideHome` / `HideGallery` | Hide the Home or Gallery section from the navigation pane. |
| `HideOnedrive` / `Hide3dObjects` / `HideMusic` | Hide these folders from the navigation pane. |
| `HideDupliDrive` | Hide duplicate removable-drive entries (keep only the one under This PC). |
| `AddFoldersToThisPC` | Add Desktop/Downloads/Documents/etc. back under This PC. |
| `HideIncludeInLibrary` / `HideGiveAccessTo` / `HideShare` | Hide these context-menu entries. |
| `ShowDriveLettersFirst` / `ShowDriveLettersLast` / `ShowNetworkDriveLettersFirst` / `HideDriveLetters` | Control drive-letter position/visibility. |

> [!NOTE]
> `Hide3dObjects`, `HideMusic`, and the `HideIncludeInLibrary`/`HideGiveAccessTo`/`HideShare` context-menu tweaks apply to **Windows 10** (build ≤ 21999) only.

### 8.7 Appearance, Multi-tasking, Updates, Optional Features & Other

| Tweak (switch) | Category | What it does |
|---|---|---|
| `EnableDarkMode` | Appearance | Enables dark theme for system and apps. |
| `DisableTransparency` | Appearance | Disables transparency effects. |
| `DisableAnimations` | Appearance | Disables animations and visual effects (requires reboot). |
| `DisableWindowSnapping` | Multi-tasking | Turns off window snapping. |
| `DisableSnapAssist` | Multi-tasking | Stops app suggestions when snapping. |
| `DisableSnapLayouts` | Multi-tasking | Hides the snap-layout flyout. |
| `HideTabsInAltTab` / `Show3TabsInAltTab` / `Show5TabsInAltTab` / `Show20TabsInAltTab` | Multi-tasking | How many app tabs appear in Alt+Tab. |
| `DisableUpdateASAP` | Windows Update | Stops your PC being first to get non-security updates. |
| `PreventUpdateAutoReboot` | Windows Update | Prevents automatic restarts after updates while signed in. |
| `DisableDeliveryOptimization` | Windows Update | Stops sharing downloaded updates with other PCs. |
| `EnableWindowsSandbox` | Optional Features | Enables Windows Sandbox (requires reboot; Pro/Enterprise/Workstation). |
| `EnableWindowsSubsystemForLinux` | Optional Features | Enables WSL (requires reboot). |
| `DisableDVR` | Gaming | Disables Xbox game/screen recording. |
| `DisableGameBarIntegration` | Gaming | Disables Game Bar integration and `ms-gamingoverlay`/`ms-gamebar` popups. |
| `DisableSettingsHome` | Other | Removes the Home page from the Settings app. |
| `DisableBraveBloat` | Other | Disables Brave browser's AI, Crypto, News, Rewards, Talk, and VPN. |

---

## 9. Running From the Command Line

Every interface option maps to a command-line parameter, so you can run Win11Debloat fully unattended — ideal for repeat installs or scripting. Pass parameters after the script name (Advanced method) or after the download one-liner (Quick method).

```powershell
# Advanced method
.\Win11Debloat.ps1 -RunDefaults -Silent

# Quick method (parameters go after the closing parenthesis)
& ([scriptblock]::Create((irm "https://debloat.raphi.re/"))) -RunDefaults -Silent
```

### 9.1 Mode & control parameters

| Parameter | Type | Purpose |
|---|---|---|
| `-RunDefaults` | switch | Apply the default tweaks **and** remove the default app selection. |
| `-RunDefaultsLite` | switch | Apply the default tweaks but **don't** remove any apps. |
| `-RunSavedSettings` | switch | Re-apply your last used settings (`LastUsedSettings.json`). |
| `-Config <path>` | string | Apply a saved `.json` configuration file (see [Section 10](#10-automation--repeatable-configs)). |
| `-Silent` | switch | Suppress all prompts and confirmation screens — run unattended. |
| `-CLI` | switch | Force the text menu instead of the graphical window. |
| `-RunAppsListGenerator` | switch | Open only the app picker and save your choice to a `CustomAppsList` file, then exit. |
| `-CreateRestorePoint` | switch | Create a System Restore point before applying changes. |
| `-NoRestartExplorer` | switch | Don't restart Explorer at the end (you'll reboot manually). |
| `-User <name>` | string | Apply changes to another (signed-out) user instead of yourself. |
| `-Sysprep` | switch | Apply changes to the Default user profile so all new users inherit them. |
| `-LogPath <path>` | string | Write the run transcript to a custom folder. |

### 9.2 App-removal parameters

| Parameter | Purpose |
|---|---|
| `-RemoveApps` | Remove the apps named by `-Apps` (defaults to the curated list). |
| `-Apps <list>` | Comma-separated app IDs to remove, or `Default`. Example: `-Apps "Microsoft.BingNews,Microsoft.ZuneVideo"`. |
| `-RemoveAppsCustom` | Remove the apps saved in your `CustomAppsList` file. |
| `-RemoveCommApps` | Remove Mail, Calendar, and People. |
| `-RemoveW11Outlook` | Remove the new Outlook for Windows. |
| `-RemoveGamingApps` | Remove the Xbox App and Game Bar apps. |
| `-RemoveHPApps` | Remove HP OEM applications. |
| `-AppRemovalTarget <scope>` | Who apps are removed for: `AllUsers` (default), `CurrentUser`, or a username. |
| `-ForceRemoveEdge` | Forcefully uninstall Microsoft Edge. **Not recommended.** |

### 9.3 Tweak parameters

Every tweak in [Section 8](#8-tweaks-reference) is also a switch. For example:

```powershell
.\Win11Debloat.ps1 -DisableTelemetry -DisableBing -EnableDarkMode -ShowKnownFileExt -TaskbarAlignLeft -Silent
```

Two tweaks take a value:

| Parameter | Purpose |
|---|---|
| `-ReplaceStart <path>` | Replace the current user's Start layout with a `start2.bin` template. |
| `-ReplaceStartAllUsers <path>` | Replace the Start layout for all users with a template. |

> [!TIP]
> If you pass `-RemoveApps` without `-Apps`, the curated default list is used automatically.

> [!NOTE]
> Tweaks that don't apply to your Windows build are silently skipped. For example, `-DisableCopilot` is ignored on builds older than 22621.

---

## 10. Automation & Repeatable Configs

For setting up many machines the same way, export your choices once and re-apply them anywhere.

### 10.1 Export and import a config (GUI)

1. Make all your selections across the tabs.
2. Open the title-bar menu → **Export config** → save a `.json` file.
3. On another machine, open the menu → **Import config** → choose the file. All selections are restored.

### 10.2 Apply a config from the command line

```powershell
.\Win11Debloat.ps1 -Config "C:\Setup\my-debloat.json" -Silent
```

A config file (version `1.0`) has up to three sections:

```json
{
  "Apps":   ["Microsoft.BingNews", "Microsoft.ZuneVideo", "Clipchamp.Clipchamp"],
  "Tweaks": [
    { "Name": "DisableTelemetry", "Value": true },
    { "Name": "EnableDarkMode",   "Value": true }
  ],
  "Deployment": [
    { "Name": "CreateRestorePoint",   "Value": true },
    { "Name": "RestartExplorer",      "Value": true },
    { "Name": "AppRemovalScopeIndex", "Value": 0 }
  ]
}
```

- **`Apps`** — app IDs to remove.
- **`Tweaks`** — tweak switches to enable (only `true` values are applied; build-incompatible tweaks are skipped).
- **`Deployment`** — run options: restore point, whether to restart Explorer, who changes apply to, and app-removal scope.

> [!TIP]
> The easiest way to build a config file is to design it in the GUI and use **Export config** — you don't have to write the JSON by hand.

### 10.3 Quick presets without a config file

```powershell
# Recommended tweaks + default app removal, no prompts
.\Win11Debloat.ps1 -RunDefaults -Silent

# Recommended tweaks only, keep all apps
.\Win11Debloat.ps1 -RunDefaultsLite -Silent

# Re-run exactly what you did last time
.\Win11Debloat.ps1 -RunSavedSettings -Silent
```

---

## 11. Applying Changes to Other Users (Advanced)

Win11Debloat can apply changes beyond the account you're signed into.

| Mode | Parameter | Use case |
|---|---|---|
| **Another user** | `-User "<username>"` | Apply your debloat selection to a *different, signed-out* local user. |
| **Sysprep / new-user defaults** | `-Sysprep` | Apply changes to the Windows **Default** profile so every newly created user inherits them. Ideal for imaging. |

> [!IMPORTANT]
> The target user for `-User` must be **signed out**. If they are logged in, Win11Debloat refuses: `User '<name>' is currently logged in. Please sign out that user first.` You also can't target your own account this way — use the Current User option instead.

> [!NOTE]
> In `-User` and `-Sysprep` modes, Explorer is **not** restarted automatically. Reboot to apply all changes. OneDrive/Edge removal is deferred via a scheduled task that runs for the target user.

> [!WARNING]
> `-Sysprep` mode is **not supported on Windows 10** and will exit with an error on those builds.

---

## 12. Reverting Changes

Almost everything Win11Debloat does can be undone.

### 12.1 Restore a registry backup (recommended)

Before applying registry tweaks, Win11Debloat saves a JSON snapshot of the exact values it's about to change into a `Backups` folder next to the script (named `Win11Debloat-RegistryBackup-<timestamp>.json`).

- **In the GUI:** title-bar menu → **Restore backup** → pick a backup → confirm.

This restores the registry to its state from before that run.

### 12.2 Use a System Restore point

If you enabled **Create a system restore point** (or passed `-CreateRestorePoint`), you can roll the whole system back via Windows' System Restore.

> [!NOTE]
> Windows only allows one automatic restore point per 24 hours. If a recent restore point already exists, Win11Debloat reports `A recent restore point already exists, no new restore point was created` and does not create another. This is expected Windows behavior, not an error.

### 12.3 Reinstall removed apps

Almost all removed apps can be reinstalled from the **Microsoft Store**. Tweaks can be reverted individually by re-running Win11Debloat and selecting the opposite option (for example, choosing a light theme, or re-showing the search box) — each tweak ships with a matching undo.

> [!TIP]
> A full guide to reverting specific changes is maintained on the [project wiki](https://github.com/Raphire/Win11Debloat/wiki/Reverting-Changes).

---

## 13. Troubleshooting

Format: the error or symptom, its cause, and what to do. These are drawn from real reported issues.

### Symptom: `Win11Debloat must be run as Administrator.`

**Cause:** The script was started without elevation.
**Solution:** Answer `y` to the `Restart as Administrator?` prompt, or relaunch PowerShell as Administrator. `Run.bat` requests elevation automatically.

### Error: `powershell execution is restricted by security policies`

**Cause:** PowerShell is running in Constrained Language Mode (locked down by policy or AppLocker/WDAC).
**Solution:** Run on a system without that restriction, or have an administrator relax the policy. Win11Debloat cannot run in this mode.

### Error: `Failed importing registry file '<name>.reg'. Exit code: 1` (or `并未将所有数据都成功写入到注册表中`)

**Cause:** A registry key was locked by Windows or another process, or your account lacked permission for one value. (The message is the localized "not all data was written to the registry" error.)
**Solution:** Win11Debloat automatically retries with a built-in fallback writer, so most of these self-recover. If a change didn't stick, reboot and re-run that single tweak. Check `Logs\Win11Debloat.log` for which key failed.

### Issue #600: Removing Windows Terminal crashes the script mid-run

**Cause:** You launched Win11Debloat *inside* Windows Terminal and then removed Windows Terminal — which closed the window the script was running in.
**Solution:** Run the script from classic **PowerShell** (not Windows Terminal) if you intend to remove Windows Terminal. Win11Debloat warns about this before removing it.

### Issue #537: Can't sign into a Microsoft or Xbox account after running

**Cause:** A required Xbox framework app (such as **Xbox Identity Provider**, marked `unsafe`) was removed.
**Solution:** Reinstall the missing Xbox apps from the Microsoft Store. Avoid removing apps with a 🔴 `unsafe` recommendation unless you're sure.

### Issue #535: `Unable to load list of installed apps via WinGet`

**Cause:** WinGet is missing, outdated, or timed out listing apps.
**Solution:** Update **App Installer** from the Microsoft Store (this provides WinGet), then re-run. App removal still works without WinGet for everything except OneDrive and Edge.

### Issue #584 / #576: Restore point creation failed / "Lost my restore points"

**Cause:** System Restore was disabled, or Windows throttled restore-point creation (max one per 24 h).
**Solution:** Win11Debloat offers to enable System Restore and asks whether to continue without a restore point. To force a fresh one, create older points manually first or wait 24 hours. This does not delete existing restore points.

### Issue #579: `Cannot convert value "-2147483647" to type "System.UInt32"`

**Cause:** An edge case parsing a registry value during a tweak.
**Solution:** This has been addressed in current releases — make sure you're running the latest version via the Quick method. Report it if it recurs.

### Symptom: Console window opens then immediately closes (Run.bat)

**Cause:** An environment issue prevented the script from launching in the chosen terminal.
**Solution:** Use the **Advanced method** ([Section 3](#3-installation--launch)) to run `Win11Debloat.ps1` directly and see the actual error.

### Symptom: A tweak you selected didn't seem to apply

**Cause:** Some tweaks only take effect after a reboot, and some require a specific Windows build.
**Solution:** Reboot. Tweaks marked "requires reboot" (e.g. disabling animations, mouse acceleration) need it. Build-gated tweaks are skipped on unsupported versions.

---

## 14. FAQ

**Q: Is Win11Debloat safe? Will it break Windows?**
Great care is taken to avoid breaking OS functionality, and changes are reversible via the automatic registry backup and System Restore. That said, use it at your own risk, and read the warnings on `unsafe` apps.

**Q: Do I need to be online?**
Only for the initial download with the Quick method. Once the files are on disk (Traditional/Advanced method), the script runs fully offline.

**Q: Can I undo everything later?**
Yes — use **Restore backup** in the menu, a System Restore point, or re-run and pick the opposite tweak. Removed apps reinstall from the Microsoft Store.

**Q: Why does my screen flicker at the end?**
Win11Debloat restarts File Explorer so changes take effect immediately. This is normal. Use `-NoRestartExplorer` to skip it and reboot instead.

**Q: How do I remove Microsoft Edge?**
Select Edge in the App Removal tab (it's marked `unsafe`). It's removed via WinGet. If WinGet can't remove it, you'll be offered a forceful uninstall (`-ForceRemoveEdge`) — this is **not recommended** because it can affect Windows Sandbox and other apps that rely on Edge.

**Q: Can I set up several PCs identically?**
Yes. Export a config in the GUI, then run `-Config <file> -Silent` on each machine, or use `-Sysprep` so every new user gets the changes.

**Q: What's the difference between Default mode and Default Lite?**
Default mode applies the recommended tweaks *and* removes the default app selection. Default Lite applies the tweaks but leaves all apps installed.

**Q: It says WinGet isn't installed — should I continue?**
You can. Everything works except removing OneDrive and Edge. Install **App Installer** from the Microsoft Store to enable those.

**Q: Where are the logs?**
In the `Logs` folder next to the script (`Win11Debloat.log`), also reachable from the title-bar menu → **Logs**.

**Q: Does removing an app delete my files?**
No. Removing an app uninstalls the program, not your documents, photos, or other personal files.

---

_Generated June 2026 from Raphire/Win11Debloat at 33b77f1. AI-generated documentation. The library is checked by sampling (three repositories so far); this guide was not individually reviewed. Verify against the project before relying on it. Unofficial; not affiliated with or reviewed by the project._
