Where to Find the JSON Configuration for Win11Debloat Features
Win11Debloat stores all feature definitions and metadata in Config/Features.json, which the main script and GUI load at runtime to populate available tweaks.
Win11Debloat uses a centralized JSON file to define every system tweak and debloating option available to users. If you need to customize which features appear in the interface or modify how specific tweaks execute, you must edit the JSON configuration for Win11Debloat features located in the repository's Config directory.
Location of the JSON Configuration File
The definitive source of truth for all Win11Debloat capabilities resides in a single file at the repository root.
Primary Configuration Path
According to the Raphire/Win11Debloat source code, the master list of tweaks is stored at Config/Features.json. This file contains an array called Features where each entry maps to a specific system modification, complete with metadata and execution logic.
How the Script References the File
In Win11Debloat.ps1, the script establishes the path using the variable:
$script:FeaturesFilePath = "$PSScriptRoot/Config/Features.json"
Both the command-line interface and the graphical user interface resolve this path at startup to load the complete feature catalog.
Structure of the Features.json File
Understanding the schema helps you customize existing tweaks or add new ones without breaking the application.
Core Schema Components
The root object contains a Features array. Each object in this array includes:
FeatureId: Unique identifier used for CLI parameters and settings mappingName: Display name shown in the GUICategory: Grouping for UI organization (e.g., "Privacy", "Apps")Priority: Integer determining sort order within categoriesDescription: Tooltip text explaining the tweak's effect
Feature Execution Properties
Beyond metadata, each feature defines its implementation through:
Command: PowerShell command string executed when the feature is applied- Registry file paths or additional script blocks required to modify Windows settings
Loading and Using the Configuration
You can programmatically access the JSON configuration for Win11Debloat features to build custom automation or audit available tweaks.
Reading the Feature List
Use the same loading logic found in the main script:
# Resolve the path to the JSON file (same logic used by the main script)
$featuresFile = Join-Path $PSScriptRoot 'Config/Features.json'
# Read and parse the JSON content
$featuresJson = Get-Content -Path $featuresFile -Raw | ConvertFrom-Json
# Iterate over the features (example: list FeatureId and Description)
foreach ($feature in $featuresJson.Features) {
Write-Host ("{0}: {1}" -f $feature.FeatureId, $feature.Description)
}
Executing Features Programmatically
To apply a specific feature outside the standard workflow:
# Suppose we want to apply the "DisableTelemetry" feature programmatically
$feature = $featuresJson.Features |
Where-Object { $_.FeatureId -eq 'DisableTelemetry' }
# The JSON entry includes a PowerShell command string (e.g., $feature.Command)
Invoke-Expression $feature.Command
Integration with Win11Debloat Components
The JSON configuration serves as the backbone for multiple subsystems within the application.
Main Script (Win11Debloat.ps1)
The entry point Win11Debloat.ps1 imports Config/Features.json during initialization to map CLI arguments to their corresponding FeatureId values. When you pass a parameter like -DisableTelemetry, the script looks up this ID in the loaded JSON to determine which commands to execute.
GUI Builder (Show-MainWindow.ps1)
Located at Scripts/GUI/Show-MainWindow.ps1, the GUI builder reads the same configuration file to dynamically generate tweak cards, tooltips, and category ordering. The interface reflects any changes made to Features.json immediately upon restart, including modified descriptions or new categories.
Settings Validation (LoadSettings.ps1)
The file Scripts/FileIO/LoadSettings.ps1 validates user-specific settings against the master feature definitions. It ensures that saved preferences reference valid FeatureId entries and handles migration when feature identifiers change between versions.
Summary
- Win11Debloat maintains all feature definitions in
Config/Features.jsonat the repository root. - The main script sets
$script:FeaturesFilePathto reference this file and loads it at runtime. - Each feature entry includes
FeatureId,Name,Category,Priority,Description, and execution commands. - Both the CLI in
Win11Debloat.ps1and the GUI inScripts/GUI/Show-MainWindow.ps1depend on this single JSON source. - You can read and execute features programmatically using standard PowerShell JSON parsing and
Invoke-Expression.
Frequently Asked Questions
Where is the Win11Debloat features configuration file located?
The configuration file is located at Config/Features.json relative to the repository root. The main script constructs this path using $PSScriptRoot/Config/Features.json to ensure it resolves correctly regardless of where you execute the script.
What properties are required when adding a new feature to Features.json?
Each feature must include a unique FeatureId, a display Name, a Category for UI grouping, a Priority integer for sorting, a Description for tooltips, and a Command string containing the PowerShell code or registry modifications to apply the tweak.
Do I need to restart the script after editing Features.json?
Yes, changes to Config/Features.json only take effect when Win11Debloat reloads the file. Restart the main Win11Debloat.ps1 script or relaunch the GUI to see updated feature names, descriptions, or new tweaks in the interface.
Can I use the JSON configuration to run Win11Debloat features in my own scripts?
Absolutely. Load the JSON file using Get-Content and ConvertFrom-Json, then filter by FeatureId to extract the Command property. You can execute these commands using Invoke-Expression or by dot-sourcing the script blocks, though care should be taken to review commands before execution for security.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →