Complete Guide to Win11Debloat Command-Line Parameters: Automate Windows 11 Debloating

Win11Debloat supports over 80 command-line switches—defined in the param() block of Win11Debloat.ps1 between lines 5 and 85—that enable silent automation, selective app removal, privacy hardening, and UI customization without launching the GUI.

Win11Debloat is a single-file PowerShell utility maintained by Raphire that automates the removal of bloatware, disabling of telemetry, and customization of the Windows 11 interface. The script’s behavior is driven entirely by its command-line interface, allowing system administrators to deploy consistent configurations across fleets or imaging environments using the Raphire/Win11Debloat repository.

Execution Mode and Core Switches

The primary execution parameters control how the script runs and whether user interaction is required.

-CLI forces the script to run in pure command-line mode, bypassing the graphical interface entirely. Use this with -Silent to suppress all interactive prompts, making the script suitable for automated deployment pipelines. For system imaging scenarios, -Sysprep applies changes to the Default user profile rather than the current user.

Administrators can specify a custom logging location with -LogPath "C:\Path\To\Logs" to store the transcript output, and -CreateRestorePoint generates a Windows System Restore point before any modifications are made. The -User parameter targets a specific user account for user-scoped changes, while -NoRestartExplorer prevents the script from restarting Windows Explorer after applying registry modifications.

Application Removal Parameters

Win11Debloat provides granular control over app removal through several parameter categories.

Bulk App Removal

To remove applications, combine -RemoveApps with the -Apps parameter:

  • -Apps "Default": Uses the built-in default list defined in Config/DefaultSettings.json
  • -Apps "App1,App2,App3": Comma-separated list of specific package names
  • -AppRemovalTarget "AllUsers" or -AppRemovalTarget "CurrentUser": Controls the scope of removal

The -RemoveAppsCustom switch removes packages listed in the CustomAppsList file generated via the GUI, while -RunAppsListGenerator opens the custom app selection interface without performing removal.

Category-Specific Removal

  • -RemoveGamingApps: Removes Xbox, Game Bar, and Game Overlay applications
  • -RemoveCommApps: Strips Mail, Calendar, and People apps
  • -RemoveHPApps: Targets HP OEM utilities
  • -RemoveW11Outlook: Removes the new Outlook for Windows UWP app
  • -ForceRemoveEdge: Forces uninstallation of Microsoft Edge using PowerShell methods

Privacy, Telemetry, and Security

The script includes extensive privacy-focused switches that modify system telemetry and data collection settings.

-DisableTelemetry turns off diagnostic data collection and telemetry services. -DisableSearchHistory clears and disables local Windows Search history storage, while -DisableBing removes Bing web search integration from the taskbar search. For location privacy, -DisableLocationServices and -DisableFindMyDevice disable system-wide tracking capabilities.

Additional security parameters include -DisableBitlockerAutoEncryption to stop automatic device encryption, -DisableFastStartup to enforce full shutdowns instead of hybrid sleep, and -DisableModernStandbyNetworking to prevent network connectivity during Modern Standby states.

Windows Feature Configuration

Several switches enable or disable optional Windows components:

  • -EnableWindowsSandbox: Activates the Windows Sandbox feature
  • -EnableWindowsSubsystemForLinux: Enables WSL2 by installing the Virtual Machine Platform and WSL components
  • -DisableDVR and -DisableGameBarIntegration: Remove Xbox Game Bar and DVR recording capabilities
  • -DisableStorageSense: Turns off automatic disk cleanup
  • -DisableUpdateASAP and -PreventUpdateAutoReboot: Control Windows Update behavior to prevent immediate downloads and automatic restarts
  • -DisableDeliveryOptimization: Disables peer-to-peer update sharing

User Interface and Taskbar Customization

Taskbar Behavior

-TaskbarAlignLeft reverts the taskbar to Windows 10-style left alignment. Button combining is controlled through three mutually exclusive switches:

  • -CombineTaskbarAlways
  • -CombineTaskbarWhenFull
  • -CombineTaskbarNever

Multi-monitor environments support -CombineMMTaskbarAlways, -CombineMMTaskbarWhenFull, and -CombineMMTaskbarNever, along with -MMTaskbarModeAll, -MMTaskbarModeMainActive, and -MMTaskbarModeActive to determine which monitor’s taskbar controls window grouping.

Search visibility options include -HideSearchTb, -ShowSearchIconTb, -ShowSearchLabelTb, and -ShowSearchBoxTb. -HideTaskview removes the Task View button, while -HideChat removes the Chat/Meet Now icon.

Start Menu Configuration

  • -DisableStartRecommended: Hides the Recommended section
  • -DisableStartAllApps: Hides the All apps list
  • -DisableStartPhoneLink: Removes Phone Link integration
  • -ClearStart: Removes all pinned apps for the current user
  • -ClearStartAllUsers: Clears pinned apps for every user profile (requires elevation)
  • -ReplaceStart "C:\Path\To\Layout.bin": Applies a custom Start layout to the current user
  • -ReplaceStartAllUsers "C:\Path\To\Layout.bin": Applies a custom layout to all users

Visual and Explorer Settings

-EnableDarkMode forces system-wide dark mode, while -DisableTransparency removes acrylic effects and -DisableAnimations turns off UI animations. File Explorer options include -ShowHiddenFolders, -ShowKnownFileExt, and -HideDupliDrive.

Navigation pane modifications include -HideOnedrive, -Hide3dObjects, -HideMusic, -HideHome, and -HideGallery. Default Explorer locations are set via -ExplorerToHome, -ExplorerToThisPC, -ExplorerToDownloads, or -ExplorerToOneDrive.

The -RevertContextMenu switch restores the classic Windows 10 context menu, while -AddFoldersToThisPC restores Desktop, Documents, and other folders under This PC.

AI and Modern Windows Features

Recent additions target Windows AI integrations:

  • -DisableCopilot: Removes Microsoft Copilot UI and package
  • -DisableRecall: Disables Windows Recall screen-recording AI
  • -DisableClickToDo: Turns off the Click-to-Do AI tool
  • -DisableAISvcAutoStart: Prevents the WSAIFabricSvc from auto-starting
  • -DisablePaintAI, -DisableNotepadAI, -DisableEdgeAI: Disable generative AI features in specific applications

Context Menus and Input

Context menu modifications include -HideIncludeInLibrary, -HideGiveAccessTo, and -HideShare to remove specific entries. -DisableDragTray disables the share-via-drag feature.

Input-related switches include -DisableMouseAcceleration to turn off enhanced pointer precision, -DisableStickyKeys to disable the Shift-five-times shortcut, and -EnableEndTask to add "End task" to the taskbar right-click menu. -EnableLastActiveClick enables last-active-click behavior on taskbar icons.

Window management parameters control snapping behavior: -DisableWindowSnapping, -DisableSnapAssist, -DisableSnapLayouts, and -HideTabsInAltTab. Alt-Tab preview quantities are set via -Show3TabsInAltTab, -Show5TabsInAltTab, or -Show20TabsInAltTab.

Practical Usage Examples

Run the script in CLI mode with default app removal and a system restore point:

.\Win11Debloat.ps1 -CLI -CreateRestorePoint -RemoveApps

Apply multiple privacy settings with custom logging:

.\Win11Debloat.ps1 -DisableTelemetry -DisableEdgeAds -DisableWidgets -LogPath "C:\Logs"

Deploy a custom Start menu layout for all user profiles:

.\Win11Debloat.ps1 -ReplaceStartAllUsers "C:\Layouts\CorporateStart.bin"

Configure taskbar to combine buttons only when full, enable dark mode, and remove Task View:

.\Win11Debloat.ps1 -CombineTaskbarWhenFull -EnableDarkMode -HideTaskview

Summary

  • Win11Debloat.ps1 defines all parameters in its param() block (lines 5-85) as switch parameters or string values.
  • -CLI and -Silent enable automation, while -Sysprep supports imaging scenarios.
  • App removal uses -Apps with either "Default" or comma-separated package names, paired with -RemoveApps.
  • Privacy is controlled through telemetry, location, and search history switches that modify registry settings mapped in Config/Features.json.
  • UI customization covers taskbar alignment, Start menu layout replacement, Explorer defaults, and modern AI feature disablement.

Frequently Asked Questions

How do I run Win11Debloat completely silently without any user prompts?

Use the -Silent switch in combination with -CLI to suppress all interactive prompts and GUI elements. For example: .\Win11Debloat.ps1 -Silent -CLI -RemoveApps -DisableTelemetry. This configuration is ideal for deployment scripts and automated imaging pipelines.

Can I target a specific user account rather than the current user?

Yes. Use the -User "Username" parameter to specify a particular account for user-scoped changes. For app removal specifically, use -AppRemovalTarget "Username" to target that user's app packages. Note that some system-wide changes will still apply globally regardless of the User parameter.

Where does Win11Debloat store the logic that translates these parameters into actual system changes?

The parameter definitions reside in Win11Debloat.ps1, but the implementation logic—including registry keys and apply-texts—is mapped in Config/Features.json. Helper scripts in Scripts/Features/ImportRegistryFile.ps1 handle the registry modifications, while Scripts/CLI/ShowCLIMenuOptions.ps1 manages the interactive CLI menu when using -CLI without explicit action switches.

What is the difference between -RunDefaults and running with specific switches?

-RunDefaults launches a preset selection UI (or applies the default preset if combined with -Silent), using the configuration stored in Config/DefaultSettings.json. In contrast, specifying individual switches like -RemoveApps or -DisableTelemetry executes only those specific actions immediately without presenting preset options.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →