The first one is `-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.
The second switch parameter is `-Debloat`, 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.
Third, Protect-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.**
The code needs a whole refactoring. Many functions are doubled thru all the different execude-methods. That makes it even harder to add new functionallity.
There should also be only one start script, preffered in PowerShell instead of Batch. Start different modes by using different parameters.
Additionally the individual scripts should end on `.ps1`.
Thank you to a60wattfish, abulgatz, Damian, Norrodar, Vikingat-RAGE, xsisbest and Reddit user /u/GavinEke for some of the suggestions and fixes that I have placed into my scripts. You all have done a fantastic job!