# ckdvs99/windows-debloat architecture

> Architecture diagram of the GitHub repository ckdvs99/windows-debloat, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ckdvs99/windows-debloat
- Repository: https://github.com/ckdvs99/windows-debloat

## Overview

This repository is a set of administrator-run PowerShell scripts for disabling Windows services and settings, enforcing those changes after updates, and applying or reverting gaming optimizations. The documented main workflow is to run the debloat script, then install a scheduled task that periodically runs the enforcement script. Separate scripts undo debloat changes and gaming optimizations. No source excerpts were provided, so relationships below rely only on the README; internal calls beyond those it documents are omitted.

Main entry points: [`scripts/enforce-bloat-disabled.ps1`](https://github.com/ckdvs99/windows-debloat/blob/main/scripts/enforce-bloat-disabled.ps1) (Enforce Settings), [`scripts/disable-bloat-services.ps1`](https://github.com/ckdvs99/windows-debloat/blob/main/scripts/disable-bloat-services.ps1) (Disable Bloat), [`scripts/uninstall.ps1`](https://github.com/ckdvs99/windows-debloat/blob/main/scripts/uninstall.ps1) (Restore Defaults), [`scripts/install-enforcement-task.ps1`](https://github.com/ckdvs99/windows-debloat/blob/main/scripts/install-enforcement-task.ps1) (Install Task)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_debloat["Debloat and Restore"]
  node_disable["Disable Bloat"]
  node_uninstall["Restore Defaults<br/>[uninstall.ps1]"]
end

subgraph group_enforcement["Scheduled Enforcement"]
  node_installer["Install Task"]
  node_task["Scheduled Task"]
  node_enforce["Enforce Settings"]
  node_log["Change Log"]
end

subgraph group_gaming["Gaming Tuning"]
  node_gaming["Gaming Optimizations"]
  node_undo["Undo Gaming Tuning"]
end

node_admin(("Administrator"))
node_windows["Windows Settings"]

node_admin -->|"runs"| node_disable
node_disable -->|"changes settings"| node_windows
node_admin -->|"runs"| node_installer
node_installer -->|"creates"| node_task
node_task -->|"runs periodically"| node_enforce
node_enforce -->|"checks and disables"| node_windows
node_enforce -->|"logs changes"| node_log
node_admin -->|"runs"| node_uninstall
node_uninstall -->|"restores settings"| node_windows
node_admin -->|"runs"| node_gaming
node_gaming -->|"applies tuning"| node_windows
node_admin -->|"runs"| node_undo
node_undo -->|"reverts tuning"| node_windows

click node_disable "https://github.com/ckdvs99/windows-debloat/blob/main/scripts/disable-bloat-services.ps1"
click node_uninstall "https://github.com/ckdvs99/windows-debloat/blob/main/scripts/uninstall.ps1"
click node_installer "https://github.com/ckdvs99/windows-debloat/blob/main/scripts/install-enforcement-task.ps1"
click node_enforce "https://github.com/ckdvs99/windows-debloat/blob/main/scripts/enforce-bloat-disabled.ps1"
click node_gaming "https://github.com/ckdvs99/windows-debloat/blob/main/scripts/gaming-optimizations.ps1"
click node_undo "https://github.com/ckdvs99/windows-debloat/blob/main/scripts/undo-gaming-optimizations.ps1"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_disable,node_uninstall toneBlue
class node_installer,node_task,node_enforce,node_log toneAmber
class node_gaming,node_undo toneMint
class node_admin,node_windows toneIndigo
```

## Components

### Debloat and Restore

- [Disable Bloat](https://github.com/ckdvs99/windows-debloat/blob/main/scripts/disable-bloat-services.ps1): `scripts/disable-bloat-services.ps1`
- [Restore Defaults](https://github.com/ckdvs99/windows-debloat/blob/main/scripts/uninstall.ps1): `scripts/uninstall.ps1`

### Scheduled Enforcement

- [Install Task](https://github.com/ckdvs99/windows-debloat/blob/main/scripts/install-enforcement-task.ps1): `scripts/install-enforcement-task.ps1`
- **Scheduled Task**
- [Enforce Settings](https://github.com/ckdvs99/windows-debloat/blob/main/scripts/enforce-bloat-disabled.ps1): `scripts/enforce-bloat-disabled.ps1`
- **Change Log**

### Gaming Tuning

- [Gaming Optimizations](https://github.com/ckdvs99/windows-debloat/blob/main/scripts/gaming-optimizations.ps1): `scripts/gaming-optimizations.ps1`
- [Undo Gaming Tuning](https://github.com/ckdvs99/windows-debloat/blob/main/scripts/undo-gaming-optimizations.ps1): `scripts/undo-gaming-optimizations.ps1`

### Other components

- **Administrator**
- **Windows Settings**

## Connections

- Administrator → Disable Bloat: runs (evidence: `README.md`)
- Disable Bloat → Windows Settings: changes settings (evidence: `README.md`)
- Administrator → Install Task: runs (evidence: `README.md`)
- Install Task → Scheduled Task: creates (evidence: `README.md`)
- Scheduled Task → Enforce Settings: runs periodically (evidence: `README.md`)
- Enforce Settings → Windows Settings: checks and disables (evidence: `README.md`)
- Enforce Settings → Change Log: logs changes (evidence: `README.md`)
- Administrator → Restore Defaults: runs (evidence: `README.md`)
- Restore Defaults → Windows Settings: restores settings (evidence: `README.md`)
- Administrator → Gaming Optimizations: runs (evidence: `README.md`)
- Gaming Optimizations → Windows Settings: applies tuning (evidence: `README.md`)
- Administrator → Undo Gaming Tuning: runs (evidence: `README.md`)
- Undo Gaming Tuning → Windows Settings: reverts tuning (evidence: `README.md`)
