r/PowerShell • • 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!

122 Upvotes

47 comments sorted by

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.

16

u/DarrenDK Nov 06 '20

My thoughts exactly. A lot of people use Tron for this and it had modes where they warn you that it is highly likely to Bork the computer.

7

u/[deleted] Nov 06 '20

There are quite a few tools that make deeper changes to windows, but this is not one of them. All of the changes this script makes are reversible, and no windows components/apps are removed that cannot be reinstalled through the microsoft store (unless you manually edit the script).

1

u/DarrenDK Nov 06 '20

That’s good to know! I may give it a shot

19

u/[deleted] Nov 06 '20

Fair enough, although the point of this script is not to speed up windows itself or save space. The main purpose is to remove distractions, annoyances and declutter certain areas of the OS (like actually making the search menu useful for lauching applications without accidentally opening edge with a bing search all the time).

I have been running most of these tweaks since the 1909 update (except for hiding the onedrive folder), and have not seen these break so far. Even if they do it's as easy as running the script every 6 months.

3

u/onionfeatures Nov 06 '20

I totally agree. Whenever I do a build I have several scripts that just removes the junk and turns off crap I don't utilise more just for a cleaner build on the way I want it, I don't expect speed or space benefits I just like to know it's more of a base line to work from with a little less crap in

0

u/segagamer Nov 07 '20

Then do it through the settings, not like this. Else you'll probably even find that a Windows update resets them back.

1

u/[deleted] Nov 07 '20 edited Nov 07 '20

Unfortunately not all of these changes can be made through settings, so for most people (that do not have a pro license to make these changes through group policies) this is basically the only way.

1

u/segagamer Nov 08 '20

What cannot be changed on a non pro licence through settings?

2

u/[deleted] Nov 08 '20

Some of these apps cannot be removed through conventional means (such as the cortana app that was seperated from search in one of the latest windows updates), disabling the bing search in windows search, hiding certain stuff from the context menus or hiding the 3d objects folder which almost nobody needs in a prominent place cannot be hidden through the normal settings.

1

u/segagamer Nov 12 '20

Some of these apps cannot be removed through conventional means (such as the cortana app that was seperated from search in one of the latest windows updates), disabling the bing search in windows search, hiding certain stuff from the context menus or hiding the 3d objects folder which almost nobody needs in a prominent place cannot be hidden through the normal settings.

So then don't remove them and leave them as is. The search functionality is used in many things and Disabling the web function can cause other apps which depend on it to stop working properly (I think the News app does for example).

3D Objects is just as in the way as Downloads, Desktop and Pictures.

0

u/[deleted] Apr 08 '21

[removed] — view removed comment

1

u/segagamer Apr 08 '21

Because there are users that will see a thread like this without knowing all the risks and bitch about issues they're experiencing on their PC or various gaming subreddits, while not realising that this script is what messed things up in the first place.

6

u/DharmaPolice Nov 06 '20

You're unlikely to reclaim much disk space unless you tackle an oversized SXS folder which has grown over time. This kind of process is either for preparing a Windows machine for some kind of imaging process OR (more likely) is more about reducing distracting visual noise on our computers.

If I search for something on my machine and my eye catches some brightly coloured icon for for a shitty third party game I never installed it triggers a "Wait a sec, what is that?" thought. And then I remember and there's a flicker of irritation. Or underneath "This PC" in Windows Explorer again, by default (Windows 10 Pro) "3D Objects" is a top level shortcut alongside Documents, Downloads, Pictures, etc as if that is of course that is the level of importance it merits. Computers are already complex enough without adding shit that doesn't need to be there.

7

u/LaxVolt Nov 06 '20

For us de-bloating is less about space saving than removing apps and items from systems we don’t want our end users using. On the switch to W10 MS changed the “Pro” version to include bloat ware and adds. We really don’t want things like candy crush or Xbox in our facility. The step up to Enterprise edition doesn’t make sense for us either.

That’s why scripts like this exist, just to have a clean OS to run Line of Business applications on.

2

u/segagamer Nov 07 '20

Not true. If you're deploying Windows 10 properly through MDT and joining it to a domain, a lot of the extras are disabled by default, and you can use Group Policy to customise further.

There is no reason for you to use a script.

1

u/____Reme__Lebeau Nov 06 '20

Workstation? I've been debating purchasing it myself but I'm strongly considering if for my next box.

I just wish they would hard layoff the forced changes.

2

u/LaxVolt Nov 06 '20

I think workstation falls somewhere between Pro and Enterprise though. We’ve got a copy on a new CAD workstation we purchased and I didn’t notice anything different about it. I think it is more of a money grab against professional systems that run Xeon processors. That’s just my 2-cents.

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

u/[deleted] Nov 06 '20

Thanks!

2

u/[deleted] 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

u/[deleted] 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

u/[deleted] 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

u/[deleted] 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

u/segagamer Nov 08 '20

Sorry I misread what you were saying :)

1

u/[deleted] 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

u/[deleted] 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

u/[deleted] Nov 06 '20

Oh interesting, I'll look more into his stuff for sure!

-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

u/[deleted] 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.