It's based on several scripts from Github. A lot of lines are just regex and lists (apps, services, tasks) of things to disable or remove.
I recommend you do your own script by choosing what you want from each type of script. I would release my script if I was sure it wouldn't break random people's computers, because IT WILL. I'm also running Windows 10 enterprise because I want as little telemetry and things shoved up my ass as possible.
Some Windows updates can change registry keys or disable certain policies. I monitor the commit log of other repos to know what I need to update, but they don't always cover everything. Feels like a lot of work but it's actually not.
Here's how I structured it:
- admin.ps1
--- admin-config.ps1 (policies, tweaks)
--- disable-services.ps1
--- remove-flash.ps1
--- ...
- user.ps1 calls
--- user-config.ps1
--- disable-gamedrv.ps1
--- disable-services.ps1
--- ...
Because if you're using a regular user account (like you should) you need to run 3 things:
- admin.ps1 as admin
- user.ps1 as admin
- user.ps1 as your regular user
I gave up on using runAs or any of the things recommended on stackoverflow, something always go wrong so it's easier to do it this way.
For a fresh install, I recommend that the first thing you do is update everything and let Windows install the 200 apps you don't want. Run the 3 things like I mentioned, reboot, run it again, reboot.
My installation is months old and it runs like new even after heavy usage, hardware changes, tons of apps and games installed/uninstalled (this kills Windows 7). Just be careful what you remove, don't ever install ccleaner or any shit. All you need is sysinternals tools.
I'm too lazy to proof-read/make this shorter, hope it helps somebody.