Win11Debloat

repository·master·Indexed 13 days ago

https://github.com/raphire/win11debloat

A lightweight PowerShell script used to declutter, customize, and optimize Windows 11. It allows users to remove preinstalled apps, disable telemetry and AI features (such as Microsoft Copilot and Windows Recall), restore Windows 10 style context menus, and manage system settings like Windows Update and Taskbar alignment. It supports three execution methods: Quick, Traditional, and Advanced, and includes a CLI for custom app removal and configuration management.

Tokens
1.9K
Snippets
4
Records
11
Agent score
99%

What's inside Win11Debloat

  1. Overview of Win11Debloat features

    master

    Win11Debloat is a PowerShell script designed to declutter and customize Windows 11. Key functional areas include:

    • App Removal: Remove various preinstalled apps.
    • Privacy & Suggested Content: Disable telemetry, diagnostic data, activity history, targeted ads, and location services.
    • AI Features: Disable/remove Microsoft Copilot, Windows Recall, and AI features in Edge, Paint, and Notepad.
    • System Customization: Restore Windows 10 style context menus, disable Sticky Keys, disable fast start-up, and manage BitLocker/Storage Sense.
    • Windows Update: Control update availability, automatic restarts, and Delivery Optimization.
    • Appearance & UI: Enable dark mode, customize Taskbar alignment/buttons, and modify File Explorer behavior (e.g., showing hidden files or file extensions).
    • Start Menu & Search: Remove pinned apps, hide recommendations, and disable Bing web search/Copilot in Windows search.
    • Advanced Capabilities: Support for applying changes to different users or using Sysprep mode to apply changes to the Windows Default user profile (ensuring all new users receive the settings).
  2. Run Win11Debloat via the Traditional method

    master

    Use this method to manually download and run the script using a batch file.

    1. Download the latest version of the script from the GitHub releases page and extract the .ZIP file.
    2. Navigate to the extracted Win11Debloat folder.
    3. Double-click the Run.bat file.
    4. Accept the Windows UAC prompt to run as administrator (required).
    5. Follow the on-screen instructions.

    Note: If the console window closes immediately, use the Advanced method instead.

  3. Run Win11Debloat via the Advanced method

    master

    Recommended for advanced users, this method involves running the .ps1 script directly via PowerShell. This method also supports command-line parameters.

    1. Download the latest version of the script from the GitHub releases page and extract the .ZIP file.
    2. Open PowerShell or Terminal as an Administrator.
    3. Temporarily enable PowerShell execution for the current process:
    Set-ExecutionPolicy Unrestricted -Scope Process -Force
    1. Navigate to the directory where the files were extracted (e.g., cd c:\Win11Debloat).
    2. Run the script:
    .\Win11Debloat.ps1
    1. Follow the on-screen instructions.
    Set-ExecutionPolicy Unrestricted -Scope Process -Force
    .\Win11Debloat.ps1
  4. Run Win11Debloat via the Quick method

    master

    The quickest way to use Win11Debloat is to download and run the script automatically using a single PowerShell command. This method supports command-line parameters for customization.

    1. Open PowerShell or Terminal.
    2. Execute the following command:
    & ([scriptblock]::Create((irm "https://debloat.raphi.re/")))
    1. Follow the on-screen instructions provided by the script.
    & ([scriptblock]::Create((irm "https://debloat.raphi.re/")))
  5. Configure App Removal Modes in Win11Debloat CLI

    master

    When running the Win11Debloat CLI, you can control how applications are removed using the following modes:

    • Default Mode (All Default Apps): Removes a predefined set of default applications. This is triggered if the RunDefaults parameter is passed.
    • Lite Mode (No Apps): Removes no applications by default. This is triggered if the RunDefaultsLite parameter is passed.
    • Custom Selection: Allows you to specify a custom list of apps to remove. If no default mode parameter is passed, the CLI will prompt you for selection.

    If you choose a custom selection (Option 2), the CLI may also prompt you to disable Game Bar integration (including ms-gamingoverlay and ms-gamebar popups) if Xbox-related apps are in your selection.

  6. Reference: App Removal Selection Options

    master

    The CLI uses the following internal logic to map user input or parameters to removal behaviors:

    Input/ParameterBehavior
    RunDefaultsSets RemoveApps to true and uses the Default app list.
    RunDefaultsLiteSets RemoveApps to false (removes no apps).
    2 (Manual Input)Sets RemoveApps to true and uses the user's SelectedApps list.

    When using custom selection (2), the following additional flags may be applied if the user confirms via prompt:

    • DisableDVR
    • DisableGameBarIntegration
  7. Remove apps via the CLI selection menu

    master

    The Show-CliAppRemoval function provides an interactive way to select and remove Windows apps. It opens a selection window (Show-AppSelectionWindow) where you can choose which apps to target.

    Once apps are selected, the script prepares the RemoveApps parameter and the list of Apps (joined by commas) for the removal process.

    Behavioral Notes:

    • If you cancel the selection window, no apps will be removed.
    • If the $Silent parameter is set to true, the script will skip the final confirmation prompt ("Press enter to remove...") and proceed automatically after selection.
    • If $Silent is false, the script waits for you to press Enter to confirm the removal or CTRL+C to quit.
  8. Select a Win11Debloat execution mode via the CLI menu

    master

    When running the Win11Debloat CLI, you can choose from several execution modes to determine how changes are applied to your system. The menu loops until a valid option is selected.

    Available modes:

    1. Default mode: Quickly applies the recommended changes.
    2. App removal mode: Allows you to select and remove specific apps without making any other system changes.
    3. Quickly apply your last used settings: (Only available if a SavedSettings file exists) Re-applies the configuration from your previous run.

    Note: Option (3) will only appear in the menu if the tool detects an existing SavedSettings file.

    Please select an option (1/2/3)
    (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
  9. View last used CLI settings with Show-CliLastUsedSettings

    master

    The Show-CliLastUsedSettings function displays the settings previously used in the CLI by reading them from the LastUsedSettings.json file. It identifies pending changes and provides a summary of what will be applied.

    By default, the function will display a summary of pending changes and prompt the user for confirmation. If the $Silent flag is set to true, the function will skip the change summary and the confirmation prompt, returning immediately after loading the settings.

  10. Select app removal options in Default Mode

    master

    When running the script in Default Mode, you can specify how Windows apps should be handled. The script provides three primary options for app removal. Note that the default selection includes apps like Microsoft Teams, Spotify, and Sticky Notes.

    Available options:

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