r/PowerShell • u/[deleted] • Nov 06 '20
Script Sharing Win10Debloat - Remove bloatware, disable bing in windows search & declutter windows 10
Hey Everyone!
For a while now I've been working on a script to quickly setup my new windows 10 installations, and I thought why not share it! Although there are many tools that promise'debloat' windows, i didn't really want to install any applications to do it. Not to mention the fact that some of those tools are not open source, and can be incredibly overwhelming and extensive to the point where most people would be put off by it.
Although you can customize what tweaks you want the script to make, with the default settings it will:
Remove all apps from this list. (Everything can be reinstalled from the microsoft store)
Hide the 3D objects folder under 'This pc' in windows explorer.
Disable bing in windows search.
Disable tips & tricks on the lockscreen. (This changes your lockscreen wallpaper to the windows default)
Disable tips, tricks and suggestions in the startmenu and settings.
Disable the 'Include in library' from context menu.
Disable the 'Give access to' from context menu.
Disable the 'Share' from context menu.
It's possible to do a customize exactly which changes you want the script to make, or you can go for the default, which should work just fine for most people. If you want to revert any of the changes you can use the included registry files and removed applications can be reinstalled from the microsoft store.
The script is available on github: https://github.com/Raphire/Win10Debloat, where you will also find a more detailed description of what my script can do. I would also like to encourage everyone to look through the script before using it!
12
u/YongTong Nov 06 '20
I use WIMWitch for that, it is open source and uses powershell. It is really powerfull in what you can do with.
2
u/drifter775 Nov 06 '20
can it remove XBox CUI?
3
u/YongTong Nov 06 '20
Yep it collects from the install.wim all apps and you can select which one to remove. You can save the settings you made for later releases or documentation and export the new install.wim or the entire .iso file.
3
u/ZestycloseRepeat3904 Nov 06 '20
Excellent script! Ironically enough I was just looking for one yesterday so this is perfect for me. I tweaked it a bit since we use OneDrive and Share files from the context menu, but the rest was exactly what I needed. Thanks for putting this together!
2
2
Nov 06 '20
I was wondering what application you use that support the name share in windows 10? Basically none of the applications I use seem to support it.
2
Nov 06 '20
Thanks for sharing. I suggest looking to advance the techniques used within the script. PowerShell is all about automation. If written with some of the functions capability you can give the user control and clean up some code.
Use a parameter switch instead of read host to decide how script behaves.
Use SupportsShouldProcess so users can have -WhatIf and -Confirm and -Verbose.
That way you can have switch statement based on user decision and for each tidying up the bulk if statements.
Hope that makes sense 😀
2
Nov 06 '20
I appreciate the tips and will definitely look into the techniques you mentioned! Thanks!
1
u/segagamer Nov 07 '20
This scripts breaks too many useful functions (Share? Give Access to? Really?) , and I've seen too many people reporting random problems because they used some random script online (rememeber Phantasy Star Online 2?).
Do not bother with these silly debloating things - you have no idea what dependencies you're Disabling here.
1
u/PM_ME_UR_CEPHALOPODS Nov 07 '20
This is a script by and for new windows admins. No professional would go about this mess.
2
Nov 07 '20
This script is for those without a windows pro license, and thus with no access to group policies. That would of course be the preferred, and supported way to go about some of these changes.
2
u/segagamer Nov 07 '20
Do you not think it would be more appropriate for new Windows Admins to learn the correct and officially supported way of doing things?
2
u/PM_ME_UR_CEPHALOPODS Nov 07 '20
Yes, using the vast amount of deployment tools available to package and deploy the os but op says this script is for singleton windows pro users which basically makes my point for me. This script is at best a waste of time or worst reinforced bad ideas and habits.
1
1
Nov 07 '20 edited Nov 07 '20
Some scripts go hard on removing crap thst will surely break some windows 10 functionalities, but this script does not. I clearly mention in thr post that you can customize exactly what you want the script to do. Also, there are zero dependencies removed by this script (unless you edit the appslist manually). All apps/packages that are removed could easily be reinstalled through the windows store aswell.
2
u/segagamer Nov 08 '20 edited Nov 08 '20
And all I'm saying is that when Phantasy Star Online 2 and Xbox GamePass launched for Windows 10, literally everyone on Reddit who complained about their games failing to install, or GameBar not launching, or weird error codes from the Windows Store/Gamepass/Xbox sign in process, admitted to running one of these scripts. Same thing with people who get weird error codes or failed Feature Updates - not saying it was yours specifically, but you are one of the many people who have tried to make something like this, and make troubleshooting issues with said services or updates a lot harder.
It's simply best to not do it at all and to instead advise them with instructions using the built in settings app to disable or uninstall what you do and don't want - letting them pick themselves. Since they're, in theory, not needing to do it more than once, there's no reason to script it.
This is almost a repeat of when I saw people giving out blanket lists of what services to disable in services.msc or msconfig startup back in the Vista days, followed by people complaining about weird shit happening afterwards. It's just not a good idea.
1
u/fosf0r Nov 12 '20
screams in blackviper
1
u/segagamer Nov 12 '20
Gosh, been a long time since I've seen a reference to that site.
2
u/fosf0r Nov 12 '20
The users of that site always ended up as my customers. Would rather have had no customers at all than that bullshit. They were SO stubborn. They'd also have all these system cleaners and optimizers installed, and possibly more than one antivirus installed simultaneously. Yet Microsoft is the bad guy to them and is the reason their shit is slow, so they go to that fucking site.. We pejoratively called these people 'power users'.
1
u/5eppa Nov 06 '20
Have you checked out Chris Titus Tech on YouTube? He has been working on this for awhile now. If nothing else you could look at his videos to see what people thought of turning things off.
2
Nov 06 '20 edited Nov 06 '20
I believe I have actually watched a few of his videos. But from what I remember he uses scripts that are much more extensive in the sense that some of the operations they make are not revertible and could actually break certain parts of the OS.
2
u/5eppa Nov 06 '20
Not at least on his most recent ones. He seems to put one of those out a week or at least it feels that way but his more recent scripts are designed to be very non-intrusive.
2
-2
u/supernova666666 Nov 06 '20
Another “let’s de-bloat” windows post, how original.
I’ve had to completely rebuild machines because of tinkering with the OS. There are so many services linked in Windows it’s dangerous work.
I recommended applying GPO’s, uninstalling a few programs and stopping a few services (if you must) but apart from that leave the OS alone.
0
Nov 06 '20
[deleted]
0
u/segagamer Nov 07 '20
No, they don't come back if you remove them properly, as in not with a script. .
1
u/PM_ME_UR_CEPHALOPODS Nov 07 '20
No. Not even if you dism the apps are still managed and ms can put them back if they choose to enforce it and they do for most.
2
u/segagamer Nov 07 '20
This is incorrect. As from 1709 (I believe) any domain joined computers will not include many of the apps typically displayed on the start screen by default. You can also choose the Start Menu layout of what you would like to display by default if you wish, and include this in your MDT answer file.
2
u/PM_ME_UR_CEPHALOPODS Nov 07 '20
Yes, that's something microsoft controlls, this is what im saying. There is a difference between deploying windows properly and hacking pieces up with this script.
43
u/quazywabbit Nov 06 '20
Every time I see one of these I ask how much it really debloats. The space saving is minimal and can’t see it speeding anything unless you have a potato. Disabling one drive or removing contextual menus are less about bloat and commonly break with each feature update anyways.