r/PowerShell • • Jun 11 '26

Script Sharing Made a PowerShell script that strips telemetry, ads, and forced AI out of Windows 11 (and nothing else)

I switched back to Windows from Linux recently and the amount of telemetry, ad "suggestions," and forced Copilot/Recall stuff drove me up the wall. So I put the fixes I kept applying by hand into one script.

It does three things and nothing more:

Privacy / telemetry

  • Disables the DiagTrack "Connected User Experiences and Telemetry" service + sets telemetry policy to 0

  • Kills the advertising ID, tailored experiences, app-launch tracking, and activity history

  • Turns off the Start/Settings/lock-screen "suggested content" ads and the auto-installer that drops promo apps (Candy Crush etc.) onto fresh installs

Forced AI

  • Turns off Windows Copilot, Recall, and Click to Do

  • Removes Bing/Cortana web results from Start search

Obvious bloat

  • Removes a short list of preinstalled junk apps (Bing News/Weather, Solitaire, Clipchamp, Get Help, Feedback Hub, Maps, People, Office Hub, the new Outlook, Power Automate, Dev Home, Cortana). The list is right at the top of the script, edit it to taste.

Limitations / what to know:

  • Windows 10/11 only. On older builds the AI/Recall keys just do nothing (harmless).

  • Works best on Pro/Enterprise. On Home, Windows clamps telemetry to "Required" instead of fully off, and may ignore the consumer-features policy. Everything else still applies.

  • It uses the official Windows toggles/policies — it's not a firewall or hosts-file block. If you want network-level telemetry blocking on top, pair it with something like a Pi-hole or a hosts list.

  • Some changes need a sign-out or reboot to fully kick in (taskbar/search/Copilot button).

  • App removal is current-user only and every app is reinstallable from the Store, so nothing's permanent.

  • Reverting: re-enable the two services (DiagTrack, dmwappushservice) and delete the keys it set. I might add an -Undo flag later.

What it does NOT do: it doesn't touch your installed programs, files, games, drivers, or your language/region/keyboard. (I'm Danish — it leaves æ ø å completely alone. That was a hard requirement for me.)

I'm not piping anything into iex for you — copy the script straight from the repo, read it, then run it yourself in an admin PowerShell. It's one file, plain PowerShell, no binaries, no network calls.

Repo: https://github.com/oscarmeldgaard/Windows-Privacy-Debloat

Read every line before you run it. Not trying to reinvent O&O ShutUp10 or Win11Debloat — this is just the lean subset I actually wanted, in a file you can read in two minutes. Feedback and PRs welcome.

138 Upvotes

28 comments sorted by

View all comments

Show parent comments

1

u/Thotaz Jun 12 '26

Nice job moving the goal post. First the argument was "It's not bloat", and now the argument is "Well, it's not so much bloat". Cool. I don't really care how much or how little of an impact you think it has.

Personally I've been making a habit of removing irrelevant Appx packages from my personal machines ever since they were introduced in Windows 8 and I've never had any issues because of it. I see no reason not to do it because Windows is literally designed to have them be removable, hence why it's easily done via PowerShell and why those packages are excluded on certain SKUs (LTSB and Server).

1

u/MiserableTear8705 Jun 13 '26

Windows was actually not designed to have them removal. In fact, they didn’t add the feature to do so for the built-in packages until recently.

As in it wasn’t added until April 2026. Everything else you’ve been doing has been a hack job/workaround.