Windows
Disables a broader list of telemetry services and scheduled tasks, plus a pick-your-own checklist of preinstalled Store apps.
Overview
This script targets telemetry-related services and scheduled tasks, a checklist of preinstalled Microsoft Store apps (Xbox apps, 3D Viewer, Mixed Reality Portal, and more) that you pick yourself, general temp-file buildup, and the Delivery Optimization cache Windows Update uses for peer-to-peer downloads. It does not claim to support every Windows version - it's written against current, commonly deployed Windows 10 and 11 builds.
Changes
- Stops and disables DiagTrack, dmwappushservice, and WerSvc, if present
- Disables a set of diagnostics-related scheduled tasks (Compatibility Appraiser, CEIP Consolidator, disk diagnostics, and more)
- Scans for around 20 optional preinstalled Store apps (Xbox apps, 3D Viewer, Mixed Reality Portal, Weather, News, Get Help, Tips, People, To Do, Maps, Phone Link, Groove Music, Movies & TV, Solitaire Collection, Skype, Clipchamp, and more), then shows a numbered checklist - you pick which numbers to remove, 'all', or skip entirely
- Clears the user and Windows temp directories
- Clears the Delivery Optimization cache
- Points you to WinUtil for further, more granular configuration
What stays
Only the named services and scheduled tasks are touched - no other services or registry settings are modified. Preinstalled apps are only removed if you pick them from the checklist. WinUtil (linked at the end) is a separate, third-party tool for anyone who wants to go further.
Command
iwr -useb https://debloatme.com/win | iex
Script source
<#
DebloatMe - Windows
https://debloatme.com/win
What this script does:
1. Disables a broader list of telemetry-related services (DiagTrack,
dmwappushservice, WerSvc, and diagnostics scheduled tasks), if present
2. Removes a checklist of preinstalled apps you pick yourself (Xbox
apps, 3D Viewer, Mixed Reality Portal, and other default Store apps)
- nothing is removed unless you select it
3. Clears temporary directories
4. Clears the Delivery Optimization cache
5. Points you toward WinUtil for further, more granular configuration
This script does not claim to support every Windows version. It has been
written against current, commonly-deployed Windows 10 and Windows 11
builds. Review it before running it.
#>
Write-Host "== DebloatMe: Windows ==" -ForegroundColor Yellow
Write-Host "This will disable selected telemetry services, let you pick preinstalled apps to remove, and clear temp/cache directories."
$confirm = Read-Host "Continue? [y/N]"
if ($confirm -notmatch '^[Yy]$') {
Write-Host "Aborted. No changes made."
exit
}
# 1. Disable selected telemetry services
Write-Host ""
Write-Host "-> Disabling selected telemetry services..."
$services = @("DiagTrack", "dmwappushservice", "WerSvc")
foreach ($svc in $services) {
$s = Get-Service -Name $svc -ErrorAction SilentlyContinue
if ($s) {
Write-Host " Stopping and disabling $svc"
Stop-Service -Name $svc -Force -ErrorAction SilentlyContinue
Set-Service -Name $svc -StartupType Disabled -ErrorAction SilentlyContinue
} else {
Write-Host " $svc not found, skipping"
}
}
Write-Host "-> Disabling selected diagnostics scheduled tasks..."
$tasks = @(
"\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser",
"\Microsoft\Windows\Application Experience\ProgramDataUpdater",
"\Microsoft\Windows\Autochk\Proxy",
"\Microsoft\Windows\Customer Experience Improvement Program\Consolidator",
"\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip",
"\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector"
)
foreach ($task in $tasks) {
$existing = Get-ScheduledTask -TaskPath (Split-Path $task -Parent).Replace("\","/") -ErrorAction SilentlyContinue
try {
Disable-ScheduledTask -TaskName (Split-Path $task -Leaf) -TaskPath ((Split-Path $task -Parent) + "\") -ErrorAction SilentlyContinue | Out-Null
} catch {}
}
# 2. Interactive checklist of preinstalled apps - nothing removed unless selected
Write-Host ""
Write-Host "-> Scanning for optional preinstalled apps..."
$candidates = @(
@{ Pattern = "Microsoft.XboxApp"; Label = "Xbox App" },
@{ Pattern = "Microsoft.XboxGameOverlay"; Label = "Xbox Game Overlay" },
@{ Pattern = "Microsoft.XboxGamingOverlay"; Label = "Xbox Gaming Overlay" },
@{ Pattern = "Microsoft.XboxIdentityProvider"; Label = "Xbox Identity Provider" },
@{ Pattern = "Microsoft.XboxSpeechToTextOverlay"; Label = "Xbox Speech To Text Overlay" },
@{ Pattern = "Microsoft.Microsoft3DViewer"; Label = "3D Viewer" },
@{ Pattern = "Microsoft.MixedReality.Portal"; Label = "Mixed Reality Portal" },
@{ Pattern = "Microsoft.BingWeather"; Label = "Weather" },
@{ Pattern = "Microsoft.BingNews"; Label = "News" },
@{ Pattern = "Microsoft.GetHelp"; Label = "Get Help" },
@{ Pattern = "Microsoft.Getstarted"; Label = "Tips" },
@{ Pattern = "Microsoft.People"; Label = "People" },
@{ Pattern = "Microsoft.Todos"; Label = "Microsoft To Do" },
@{ Pattern = "Microsoft.WindowsAlarms"; Label = "Alarms & Clock" },
@{ Pattern = "Microsoft.WindowsMaps"; Label = "Maps" },
@{ Pattern = "Microsoft.YourPhone"; Label = "Phone Link" },
@{ Pattern = "Microsoft.ZuneMusic"; Label = "Media Player / Groove Music" },
@{ Pattern = "Microsoft.ZuneVideo"; Label = "Movies & TV" },
@{ Pattern = "Microsoft.MicrosoftSolitaireCollection"; Label = "Solitaire Collection" },
@{ Pattern = "Microsoft.MicrosoftOfficeHub"; Label = "Office Hub (Store shortcut app)" },
@{ Pattern = "Microsoft.SkypeApp"; Label = "Skype" },
@{ Pattern = "Microsoft.Clipchamp"; Label = "Clipchamp" },
@{ Pattern = "Microsoft.PowerAutomateDesktop"; Label = "Power Automate" },
@{ Pattern = "Microsoft.Wallet"; Label = "Wallet" }
)
$found = @()
foreach ($c in $candidates) {
$pkg = Get-AppxPackage -Name $c.Pattern -ErrorAction SilentlyContinue
if ($pkg) {
$found += $c
}
}
if ($found.Count -eq 0) {
Write-Host " None of the optional apps on the list are installed."
} else {
Write-Host ""
Write-Host "Optional apps found on this system:"
for ($i = 0; $i -lt $found.Count; $i++) {
Write-Host (" [{0}] {1}" -f ($i + 1), $found[$i].Label)
}
Write-Host ""
$selection = Read-Host "Enter numbers to remove (space-separated), 'all', or press Enter to skip"
$toRemove = @()
if ($selection -eq "all") {
$toRemove = $found
} elseif ($selection.Trim() -ne "") {
$nums = $selection -split '\s+'
foreach ($n in $nums) {
$idx = [int]$n - 1
if ($idx -ge 0 -and $idx -lt $found.Count) {
$toRemove += $found[$idx]
}
}
}
if ($toRemove.Count -eq 0) {
Write-Host " Nothing selected. Skipping."
} else {
foreach ($c in $toRemove) {
Write-Host (" Removing {0}" -f $c.Label)
Get-AppxPackage -Name $c.Pattern -AllUsers -ErrorAction SilentlyContinue | Remove-AppxPackage -ErrorAction SilentlyContinue
Get-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue |
Where-Object { $_.DisplayName -eq $c.Pattern } |
Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue | Out-Null
}
}
}
# 3. Clear temporary directories
Write-Host ""
Write-Host "-> Clearing temporary directories..."
$tempPaths = @($env:TEMP, "$env:WINDIR\Temp")
foreach ($path in $tempPaths) {
if (Test-Path $path) {
Write-Host " Clearing $path"
Get-ChildItem -Path $path -Recurse -Force -ErrorAction SilentlyContinue |
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
}
}
# 4. Clear Delivery Optimization cache
Write-Host ""
Write-Host "-> Clearing Delivery Optimization cache..."
try {
Delete-DeliveryOptimizationCache -Force -ErrorAction Stop
} catch {
Write-Host " Delete-DeliveryOptimizationCache not available, skipping."
}
# 5. Point toward WinUtil for further configuration
Write-Host ""
Write-Host "== Done. ==" -ForegroundColor Green
Write-Host "For additional, more granular Windows configuration, see WinUtil:"
Write-Host " https://github.com/ChrisTitusTech/winutil"
# Self-deletion: this only removes the temporary downloaded copy of this
# script, it is not a security feature.
$scriptPath = $MyInvocation.MyCommand.Path
if ($scriptPath -and (Test-Path $scriptPath)) {
Remove-Item -Path $scriptPath -Force -ErrorAction SilentlyContinue
}
Warning
This script modifies your system
This script does not claim to support every Windows version. Disabling DiagTrack can affect some diagnostics-dependent features (e.g. certain Feedback Hub flows) - most people never notice, but it's worth knowing before you run it.
- Self-deletion: this script removes its own temporary downloaded copy after it finishes. That's a cleanup step, not a security feature.
- Review the source above before running it, especially on a system you can't easily restore.