Windows 10 debloater github

Windows 10 debloater github

Debloat Windows 10

This project collects PowerShell scripts which help to debloat Windows 10, tweak common settings and install basic software components.

I test these scripts on a Windows 10 Professional 64-Bit (English) virtual machine. Please let me know if you encounter any issues. Home Edition and different languages are not supported. These scripts are intended for tech-savvy administrators, who know what they are doing and just want to automate this phase of their setup. If this profile does not fit you, I recommend using a different (more interactive) tool — and there are a lot of them out there.

Also, note that gaming-related apps and services will be removed/disabled. If you intend to use your system for gaming, adjust the scripts accordingly.

There is no undo, I recommend only using these scripts on a fresh installation (including Windows Updates). Test everything after running them before doing anything else. Also, there is no guarantee that everything will work after future updates since I cannot predict what Microsoft will do next.

The scripts are designed to run without any user interaction. Modify them beforehand. If you want a more interactive approach check out DisableWinTracking from 10se1ucgo.

Download Latest Version

Code located in the master branch is always considered under development, but you’ll probably want the most recent version anyway.

Enable execution of PowerShell scripts:

Unblock PowerShell scripts and modules within this directory:

Scripts can be run individually, pick what you need.

  1. Install all available updates for your system.
  2. Edit the scripts to fit your need.
  3. Run the scripts you want to apply from a PowerShell with administrator privileges (Explorer Files > Open Windows PowerShell > Open Windows PowerShell as administrator )
  4. PS > Restart-Computer
  5. Run disable-windows-defender.ps1 one more time if you ran it in step 3
  6. PS > Restart-Computer

In the past I included small fixes to make the start menu more usable, like removing default tiles, disabling web search and so on. This is no longer the case since I am fed up with it. This fucking menu breaks for apparently no reason, is slow, is a pain to configure / script and even shows ads out of the box!

Please replace it with something better, either use Open Shell or Start is Back, but stop using that shit.

Start menu Search

After running the scripts, the start menu search-box may no longer work on newly created accounts. It seems like there is an issue with account initialization that is triggered when disabling the GeoLocation service. Following workaround has been discovered by BK from Atlanta:

  1. Delete registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lfsvc\TriggerInfo\3
  2. Re-enable GeoLocation service (set startup type to Automatic )
  3. Reboot
  4. Login with the account having the stated issue
  5. Start Cortana and set your preferences accordingly (web search and whatnot)

You may now disable the GeoLocation service again, the search box should remain functional.

Sysprep will hang

If you are deploying images with MDT and running these scripts, the sysprep step will hang unless dmwappushservice is active.

Xbox Wireless Adapter

Apparently running the stock remove-default-apps script will cause Xbox Wireless Adapters to stop functioning. I suspect one should not remove the Xbox App when wanting to use one. But I haven’t confirmed this yet, and there is a workaround to re-enable it afterwards. See #78.

Issues with Skype

Some of the domains blocked by adding them to the hosts-file are required for Skype. I highly discourage using Skype, however some people may not have the option to use an alternative. See the #79.

Fingerprint Reader / Facial Detection not Working

Ensure Windows Biometric Service is running. See #189.

All scripts are provided as-is and you use them at your own risk.

I would be happy to extend the collection of scripts. Just open an issue or send me a pull request.

Windows 10 debloater github

Windows 10 DeBloater

Windows 10’s auto-installing bloatware is getting worse with every update. This is an all-in-one program that runs a compilation of registry edits and commands to help de-bloat Windows 10. It’s been tested with the Spring 2017 Creators Update, and should work with the Fall Creators Update as well.

Download the Win10Debloater.zip file from the lastest release, and extract it anywhere you like. Right-click the file «RUN-AS-ADMIN.bat» and, you guessed it, choose Run as Administrator. Agree to all the registry edits, you can check what each one does first if you like. And that’s it!

Explanation of each file

Asking you to run a bunch of registry edits and PowerShell scripts that you downloaded online is obviously suspicious, so here’s a description of what each file does. Again, you can easily look at the files yourself to confirm.

RUN-AS-ADMIN.bat
This is the main file to run. It runs all the other files in the directory, in the proper order.

RegistryChanges.reg
This file changes two registry values, SilentInstalledAppsEnabled and AllowTelemetry. SilentInstalledAppsEnabled allows Windows 10 to install apps like Facebook or Skype without prompting you and without your permission. AllowTelemetry lets Windows collect data about your machine that they claim «enhances the user experience» and it won’t let you turn this off completely. This .reg file sets both of those values to disabled.

RemoveBuiltInPrograms.ps1
This is a PowerShell script that uninstalls all the bloatware programs that come built in to Windows 10. The full list can be seen in removed-programs.txt, but none of these effect normal use and are rarely ever used on a desktop.

DisableTelemetryServices.ps1
Another PowerShell script, this one disables two telemetry services, Connected User Experiences and dmwappushsvc. Again, these have no effect on Windows and are only used for data collection.

FinishedMessage.vbs
Displays a message giving you the option to restart Windows in 5 minutes. Choose «no» if you want to restart on your own time.

«I see something that could be done better» or «I have something you should add/remove/modify»

Microsoft is always getting new sponsers and adding new ways to get around a user’s settings and install programs/collect data. If you have anything you’d like me to add, just make a merge request and I’ll take a look as soon as I can. Or just report it as an issue if you’d rather I add it to the script instead.

About

Windows 10’s auto-installing bloatware is getting worse with every update. This is an all-in-one program that runs a compilation of registry edits and commands to help de-bloat Windows 10.

Windows 10 debloater github

Script/Utility/Application to debloat Windows 10, to remove Windows pre-installed unnecessary applications, stop some telemetry functions, stop Cortana from being used as your Search Index, to disable unnecessary scheduled tasks, and more.

Donate a cup of coffee

Be sure to look at the Contributors’ Githubs to see if they have GitHub sponsorships as well, since they have contributed to this open source project. (https://github.com/Sycnex/Windows10Debloater/graphs/contributors)

WARNING: I do NOT take responsibility for what may happen to your system! Run scripts at your own risk! Also, other variants of this repo are not technically «new» versions of this, but they are different in their own respective ways. There are some sites saying that other projects are «new» versions of this, but that is inaccurate.

How To Run the Windows10Debloater.ps1 and the Windows10DebloaterGUI.ps1 files

There are different methods of running the PowerShell script. The methods are as follows:

  1. Download the .zip file on the main page of the github and extract the .zip file to your desired location
  2. Once extracted, open PowerShell (or PowerShell ISE) as an Administrator
  3. Enable PowerShell execution Set-ExecutionPolicy Unrestricted -Force
  4. On the prompt, change to the directory where you extracted the files: e.g. — cd c:\temp
  5. Next, to run either script, enter in the following: e.g. — .\Windows10DebloaterGUI.ps1
  1. Download the .zip file on the main page of the github and extract the .zip file to your desired location
  2. Right click the PowerShell file that you’d like to run and click on «Run With PowerShell»
  3. This will allow the script to run without having to do the above steps but Powershell will ask if you’re sure you want to run this script.
Читайте также:  Российский антивирус для linux

Remember this script NEEDS to be run as admin in order to function properly.

How To Run the Windows10SysPrepDebloater.ps1 file

For the WindowsSysPrepDebloater.ps1 file, there are a couple of parameters that you can run so that you can specify which functions are used. The parameters are: -SysPrep , -Debloat and -Privacy .

To run this with parameters, do the following:

  1. Download the .zip file on the main page of the github and extract the .zip file to your desired location
  2. Once extracted, open PowerShell (or PowerShell ISE) as an Administrator
  3. On the prompt, change to the directory where you extracted the files: e.g. — cd c:\temp
  4. Next, to run either script, enter in the following: e.g. — .\Windows10SysPrepDebloater.ps1 -Sysprep, -Debloat -Privacy

Sysprep, Interactive, and GUI Application

There are now 3 versions of Windows10Debloater — There is an interactive version, a GUI app version, and a pure silent version.

Windows10SysPrepDebloater.ps1 -> The silent version now utilizes the switch parameters: -Sysprep, -Debloat -Privacy. The silent version can be useful for deploying MDT Images/sysprepping or any other way you deploy Windows 10. This will work to remove the bloatware during the deployment process.

Windows10Debloater.ps1 -> This interactive version is what it implies — a Windows10Debloater script with interactive prompts. This one should not be used for deployments that require a silent script with optional parameters. This script gives you choices with prompts as it runs so that you can make the choices of what the script does.

Windows10DebloaterGUI.ps1 -> There is now a GUI Application named Windows10DebloaterGUI.ps1 with buttons to perform all of the functions that the scripts do. This is better for the average user who does not want to work with code, or if you’d prefer to just see an application screen.

There are 3 switch parameters in the Windows10SysPrepDebloater.ps1 script.

-SysPrep , which runs the command within a function: get-appxpackage | remove-appxpackage. This is useful since some administrators need that command to run first in order for machines to be able to properly provision the apps for removal.

-Debloat , switch parameter which does as it suggests. It runs the following functions: Start-Debloat, Remove-Keys, and Protect-Privacy. Remove-Keys removes registry keys leftover that are associated with the bloatware apps listed above, but not removed during the Start-Debloat function.

-Privacy , adds and/or changes registry keys to stop some telemetry functions, stops Cortana from being used as your Search Index, disables «unneccessary» scheduled tasks, and more.

This script will remove the bloatware from Windows 10 when using Remove-AppXPackage/Remove-AppXProvisionedPackage, and then delete specific registry keys that are were not removed beforehand. For best results, this script should be ran before a user profile is configured, otherwise you will likely see that apps that should have been removed will remain, and if they are removed you will find broken tiles on the start menu.

These registry keys are

EclipseManager, ActiproSoftwareLLC, Microsoft.PPIProjection, Microsoft.XboxGameCallableUI

You can choose to either ‘Debloat’ or ‘Revert’. Depending on your choice, either one will run specific code to either debloat your Windows 10 machine.

The Debloat switch choice runs the following functions

Debloat, Remove-Keys, Protect-Privacy, Stop-EdgePDF (If chosen)

The Revert switch choice runs the following functions

The Revert option reinstalls the bloatware and changes your registry keys back to default.

The scheduled tasks that are disabled are

XblGameSaveTaskLogon, XblGameSaveTask, Consolidator, UsbCeip, DmClient

These scheduled tasks that are disabled have absolutely no impact on the function of the OS.

Bloatware that is removed

3DBuilder, ActiproSoftware, Alarms, Appconnector, Asphalt8, Autodesk SketchBook, MSN Money, Food And Drink, Health And Fitness, Microsoft News, MSN Sports, MSN Travel, MSN Weather, BioEnrollment, Windows Camera, CandyCrush, CandyCrushSoda, Caesars Slots Free Casino, ContactSupport, CyberLink MediaSuite Essentials, DrawboardPDF, Duolingo, EclipseManager, Facebook, FarmVille 2 Country Escape, Flipboard, Fresh Paint, Get started, iHeartRadio, King apps, Maps, March of Empires, Messaging, Microsoft Office Hub, Microsoft Solitaire Collection, Microsoft Sticky Notes, Minecraft, Netflix, Network Speed Test, NYT Crossword, Office Sway, OneNote, OneConnect, Pandora, People, Phone, Phototastic Collage, PicsArt-PhotoStudio, PowerBI, Royal Revolt 2, Shazam, Skype for Desktop, SoundRecorder, TuneInRadio, Twitter, Windows communications apps, Windows Feedback, Windows Feedback Hub, Windows Reading List, XboxApp, Xbox Game CallableUI, Xbox Identity Provider, Zune Music, Zune Video.

Quick download link

iwr -useb https://git.io/debloat|iex

Allowlist and Blocklist

There may be some confusion, but when using the Allowlist/Blocklist, the checkmark means it is on the blocklist, and that it will be removed.

Windows 10 debloater github

Win10 Debloater is a fork of Win10 Initial Setup Script mostly centered on optimizing Virtual Machines.

If you just want to run the script with the default preset, download and unpack the latest release and then simply double-click on the Default.cmd file and confirm User Account Control prompt. Make sure your account is a member of Administrators group as the script attempts to run with elevated privileges.

The script supports command line options and parameters which can help you customize the tweak selection or even add your own custom tweaks, however these features require some basic knowledge of command line usage and PowerShell scripting. Refer to Advanced usage section for more details.

Q: Can I run the script safely?
A: Definitely not. You have to understand what the functions do and what will be the implications for you if you run them. Some functions lower security, hide controls or uninstall applications. If you’re not sure what the script does, do not attempt to run it!

Q: Can I run the script repeatedly?
A: Yes! In fact the script has been written to support exactly that, as it’s not uncommon that big Windows Updates reset some of the settings.

Q: Which versions and editions of Windows are supported?
A: The script aims to be fully compatible with the most up-to-date 64bit version of Windows 10 receiving updates from semi-annual channel, however if you create your own preset and exclude the incompatible tweaks, it will work also on LTSB/LTSC and possibly also on 32bit systems. Vast majority of the tweaks will work on all Windows editions. Some of them rely on group policy settings, so there may be a few limitations for Home and Education editions.

Q: Can I run the script on Windows Server 2016 or 2019?
A: Yes. Starting from version 2.5, Windows Server is supported. There are even few tweaks specific to Server environment. Keep in mind though, that the script is still primarily designed for Windows 10, so you have to create your own preset.

Q: Can I run the script on Windows 7, 8, 8.1 or other versions of Windows?
A: No. Although some tweaks may work also on older versions of Windows, the script is developed only for Windows 10 and Windows Server 2016 / 2019. There are no plans to support older versions.

Читайте также:  Perfmon rel windows 10

Q: Can I run the script in multi-user environment?
A: Yes, to certain extent. Some tweaks (most notably UI tweaks) are set only for the user currently executing the script. As stated above, the script can be run repeatedly; therefore it’s possible to run it multiple times, each time as different user. Due to the nature of authentication and privilege escalation mechanisms in Windows, most of the tweaks can be successfully applied only by users belonging to Administrators group. Standard users will get an UAC prompt asking for admin credentials which then causes the tweaks to be applied to the given admin account instead of the original non-privileged one. There are a few ways how this can be circumvented programmatically, but I’m not planning to include any as it would negatively impact code complexity and readability. If you still wish to try to use the script in multi-user environment, check this answer in issue #29 for some pointers.

Q: Did you test the script?
A: Yes. I’m testing new additions on up-to-date 64bit Home and Enterprise editions in VMs. I’m also regularly using it for all my home installations after all bigger updates.

Q: I’ve run the script and it did something I don’t like, how can I undo it?
A: For every tweak, there is also a corresponding function which restores the default settings. The default is considered freshly installed Windows 10 or Windows Server 2016 with no adjustments made during or after the installation. Use the tweaks to create and run new preset. Alternatively, since some functions are just automation for actions which can be done using GUI, find appropriate control and modify it manually.

Q: I’ve run the script and some controls are now greyed out and display message «Some settings are hidden or managed by your organization«, why?
A: To ensure that system-wide tweaks are applied smoothly and reliably, some of them make use of Group Policy Objects (GPO). The same mechanism is employed also in companies managing their computers in large scale, so the users without administrative privileges can’t change the settings. If you wish to change a setting locked by GPO, apply the appropriate restore tweak and the control will become available again.

Q: I’ve run the script and it broke my computer / killed neighbor’s dog / caused world war 3.
A: I don’t care. Also, that’s not a question.

Q: I’m using a tweak for on my installation, can you add it?
A: Submit a PR, create a feature request issue or drop me a message. If I find the functionality simple, useful and not dependent on any 3rd party modules or executables (including also Chocolatey, NuGet, Ninite or other automation solutions), I might add it.

Q: Can I use the script or modify it for my / my company’s needs?
A: Sure, knock yourself out. Just don’t forget to include copyright notice as per MIT license requirements. I’d also suggest including a link to this GitHub repo as it’s very likely that something will be changed, added or improved to keep track with future versions of Windows 10.

Q: Why are there repeated pieces of code throughout some functions?
A: So you can directly take a function block or a line from within a function and use it elsewhere, without elaborating on any dependencies.

Q: For how long are you going to maintain the script?
A: As long as I use Windows 10.

Q: I really like the script. Can I send a donation?
A: Feel free to send donations via PayPal. Any amount is appreciated, but keep in mind that donations are completely voluntary and I’m not obliged to make any script adjustments in your favor regardless of the donated amount. You can also drop me a mail to discuss an alternative way.

Windows builds overview

Version Code name Marketing name Build
1507 Threshold 1 (TH1 / RTM) N/A 10240
1511 Threshold 2 (TH2) November Update 10586
1607 Redstone 1 (RS1) Anniversary Update 14393
1703 Redstone 2 (RS2) Creators Update 15063
1709 Redstone 3 (RS3) Fall Creators Update 16299
1803 Redstone 4 (RS4) April 2018 Update 17134
1809 Redstone 5 (RS5) October 2018 Update 17763
1903 19H1 May 2019 Update 18362
1909 19H2 November 2019 Update 18363
2004 20H1 May 2020 Update 19041
2009 20H2 October 2020 Update 19042

The tweak library consists of separate idempotent functions, containing one tweak each. The functions can be grouped to presets. Preset is simply a list of function names which should be called. Any function which is not present or is commented in a preset will not be called, thus the corresponding tweak will not be applied. In order for the script to do something, you need to supply at least one tweak library via -include and at least one tweak name, either via -preset or directly as command line argument.

The tweak names can be prefixed with exclamation mark ( ! ) which will instead cause the tweak to be removed from selection. This is useful in cases when you want to apply the whole preset, but omit a few specific tweaks in the current run. Alternatively, you can have a preset which «patches» another preset by adding and removing a small amount of tweaks.

To supply a customized preset, you can either pass the function names directly as arguments.

Or you can create a file where you write the function names (one function name per line, no commas or quotes, whitespaces allowed, comments starting with # ) and then pass the filename using -preset parameter.
Example of a preset file mypreset.txt :

Command using the preset file above:

The script also supports inclusion of custom tweaks from user-supplied modules passed via -include parameter. The content of the user-supplied module is completely up to the user, however it is strongly recommended to have the tweaks separated in respective functions as the main tweak library has. The user-supplied scripts are loaded into the main script via Import-Module , so the library should ideally be a .psm1 PowerShell module. Example of a user-supplied tweak library mytweaks.psm1 :

Command using the script above:

All features described above can be combined. You can have a preset which includes both tweaks from the original script and your personal ones. Both -include and -preset options can be used more than once, so you can split your tweaks into groups and then combine them based on your current needs. The -include modules are always imported before the first tweak is applied, so the order of the command line parameters doesn’t matter and neither does the order of the tweaks (except for RequireAdmin , which should always be called first and Restart , which should be always called last). It can happen that some tweaks are applied more than once during a singe run because you have them in multiple presets. That shouldn’t cause any problems as the tweaks are idempotent.
Example of a preset file otherpreset.txt :

Command using all three examples combined:

If you’d like to store output from the script execution, you can do so using -log parameter followed by a filename of the log file you want to create. For example:

The logging is done using PowerShell Start-Transcript cmdlet, which writes extra information about current environment (date, machine and user name, command used for execution etc.) to the beginning of the file and logs both standard output and standard error streams.

Maintaining own forks

The easiest way to customize the script settings it is to create your own preset and, if needed, your own tweak scripts as described above. For easy start, you can base the modifications on the Default.cmd and Default.preset and maintain just that. If you choose to fork the script anyway, you don’t need to comment or remove the actual functions in Win10.psm1, because if they are not called, they are not used.

If you wish to make more elaborate modifications of the basic script and incorporate some personal tweaks or adjustments, then I suggest doing it in a following way:

Fork the repository on GitHub (obviously).

Clone your fork on your computer.

Add the original repository as a remote (upstream).

Commit your modifications as you see fit.

Once there are new additions in the upstream, create a temporary branch, fetch the changes and reset the branch to be identical with this repository.

When you have the upstream branch up to date, check back your master and rebase it based on the upstream branch. If there are some conflicts between the changesets, you’ll be asked to resolve them manually.

Eventually, delete the upstream branch and force push your changes back onto GitHub.

Word of warning: Rebasing and force-pushing will change the history of your commits. The upside is that your adjustments will always stay on top of the commit history. The downside is that everybody remote-tracking your repository will always have to rebase and force-push too, otherwise their commit history will not match yours.

Following is a list of rules which I’m trying to apply in this project. The rules are not binding and I accept pull requests even if they don’t adhere to them, as long as their purpose and content are clear. In cases when there are too many rule violations, I might simply redo the whole functionality and reject the PR while still crediting you. If you’d like to make my work easier, please consider adhering to the following rules too.

Try to give a function a meaningful name up to 25 characters long, which gives away the purpose of the function. Use verbs like Enable / Disable , Show / Hide , Install / Uninstall , Add / Remove in the beginning of the function name. In case the function doesn’t fit any of these verbs, come up with another name, beginning with the verb Set , which indicates what the function does, e.g. SetCurrentNetworkPrivate and SetCurrentNetworkPublic .

Always add a function with opposite name (or equivalent) which reverts the behavior to default. The default is considered freshly installed Windows 10 or Windows Server 2016 / 2019 with no adjustments made during or after the installation. If you don’t have access to either of these, create the revert function to the best of your knowledge and I will fill in the rest if necessary.

Check if there isn’t already a function with similar purpose as the one you’re trying to add. As long as the name and objective of the existing function is unchanged, feel free to add your tweak to that function rather than creating a new one.

Try to group functions thematically. There are already several major groups (privacy, security, services etc.), but even within these, some tweaks may be related to each other. In such case, add a new tweak below the existing one and not to the end of the whole group.

Always add a reference to the tweak and its revert function in the Default.preset. Add references to both functions on the same line (mind the spaces) and always comment out the revert function. Whether to comment out also the tweak in the default preset is a matter of personal preference. The rule of thumb is that if the tweak makes the system faster, smoother, more secure and less obtrusive, it should be enabled by default. Usability has preference over performance (that’s why e.g. indexing is kept enabled).

Unless applied on unsupported system, all functions have to be applicable repeatedly without any errors. When you’re creating a registry key, always check first if the key doesn’t happen to already exist. When you’re deleting registry value, always append -ErrorAction SilentlyContinue to prevent errors while deleting already deleted values.

Input / output hiding

Suppress all output generated by commands and cmdlets using | Out-Null or -ErrorAction SilentlyContinue where applicable. Whenever an input is needed, use appropriate arguments to suppress the prompt and programmatically provide values for the command to run (e.g. using -Confirm:$false ). The only acceptable output is from the Write-Output cmdlets in the beginning of each function and from non-suppressible cmdlets like Remove-AppxPackage .

Create the registry keys only if they don’t exist on fresh installation if Windows 10 or Windows Server 2016 / 2019. When deleting registry, delete only registry values, not the whole keys. When you’re setting registry values, always use Set-ItemProperty instead of New-ItemProperty . When you’re removing registry values, choose either Set-ItemProperty or Remove-ItemProperty to reinstate the same situation as it was on the clean installation. Again, if you don’t know what the original state was, let me know in PR description and I will fill in the gaps. When you need to use HKEY_USERS registry hive, always add following snippet before the registry modification to ensure portability.

Star Wars jokes aside, don’t use -Force option unless absolutely necessary. The only permitted case is when you’re creating a new registry key (not a value) and you need to ensure that all parent keys will be created as well. In such case always check first if the key doesn’t already exist, otherwise you will delete all its existing values.

Always add a simple comment above the function briefly describing what the function does, especially if it has an ambiguous name or if there is some logic hidden under the hood. If you know that the tweak doesn’t work on some editions of Windows 10 or on Windows Server, state it in the comment too. Add a Write-Output cmdlet with the short description of action also to the first line of the function body, so the user can see what is being executed and which function is the problematic one whenever an error occurs. The comment is written in present simple tense, the Write-Output in present continuous with ellipsis (resp. three dots) at the end.

Indent using tabs, enclose all string values in double quotes ( » ) and strictly use PascalCase wherever possible. Put opening curly bracket on the same line as the function name or condition, but leave the closing bracket on a separate line for readability.

Naming example: Consider function EnableFastMenu . What does it do? Which menu? How fast is fast? A better name might be EnableFastMenuFlyout , so it’s a bit clearer that we’re talking about the menu flyouts delays. But the counterpart function would be DisableFastMenuFlyouts which is not entirely true. We’re not disabling anything, we’re just making it slow again. So even better might be to name them SetFastMenuFlyouts and SetSlowMenuFlyouts . Or better yet, just add the functionality to already existing SetVisualFXPerformance / SetVisualFXAppearance . Even though the names are not 100% match, they aim to tweak similar aspects and operate within the same registry keys.

Coding example: The following code applies most of the rules mentioned above (naming, output hiding, repeatability, force usage, comments and coding style).

Читайте также:  Windows не видит жесткий диск после макбука
Оцените статью