Raphire / Win11Debloat

A simple, easy to use PowerShell script to remove pre-installed apps from Windows, disable telemetry, remove Bing from Windows search as well as perform various other changes to declutter and improve your Windows experience. This script works for both Windows 10 and Windows 11.
MIT License
14.27k stars 619 forks source link

Add option to disable OneDrive sync #9

Open wjk opened 1 year ago

wjk commented 1 year ago

First of all, thank God for people like you who make these scripts. I now have something to add to my Windows setup automation toolbox (which is annoying enough to use already, but that’s not your fault).

I am not certain if you have heard, but Microsoft has enshittified OneDrive via making it impossible to turn off Desktop and Documents folder sync, and have it stay off. The article I read (paywalled, unfortunately) says that there will be a Group Policy setting to handle this. I do not know what it is or if it has been released yet.

I just wanted to ensure that this is on your radar.

Raphire commented 1 year ago

Heya,

Thanks for bringing the OneDrive issue to my attention. It really is a shame how MS is ruining their OS by forcing features on people :/

Are you looking for a solution to disable/uninstall OneDrive completely, or just the folder syncing part?

wjk commented 1 year ago

Both, honestly? 🤔 I would appreciate both a feature to disable OneDrive completely (to be put in the custom list) and to disable the folder syncing part (to be put in the default list).

Raphire commented 1 year ago

Fair enough!

I'll have to look into this more before I can implement this though, since it affects people's files, especially disabling syncing which moves the folder locations around.

reemoteg commented 1 year ago

Sorry if this is a dumb question, but I'm new to Win11 and it's melting my brain... disabling the OneDrive nonsense would also disable the Windows Backup "feature," correct? BTW, thank you so much for your work.

Raphire commented 1 year ago

Sorry if this is a dumb question, but I'm new to Win11 and it's melting my brain... disabling the OneDrive nonsense would also disable the Windows Backup "feature," correct? BTW, thank you so much for your work.

This is true, but some people might want to use onedrive without using the folder backup feature. So giving the option to just disable the folder backup can be useful.

reemoteg commented 1 year ago

Agreed on having the option. Personally, I would disable both for office workstations, but I can see why someone might still want to have the option to use onedrive without the backup feature. Thank you again.

ZaxLofful commented 9 months ago

I agree with it being an option, but it should be strictly that "optional" and not part of the default config

Raphire commented 9 months ago

I agree with it being an option, but it should be strictly that "optional" and not part of the default config

This would definitely be an option, it will not be added to the default config.

Raphire commented 8 months ago

Just a short update on this. I've been trying to find a good, consistent way to remove OneDrive, but unfortunately it seems to be quite a mess. Sure, there's plenty of articles with all kinds of solutions for this issue, but I haven't been able to find a method that works well and is suitable for this script.

Disabling OneDrive folder backups does look more promising, I'll be testing this soon and I'll update this issue if I have more info.

P.S. If you have a good way to uninstall OneDrive via powershell or any other way (apart from manually uninstalling it) please let me know :)

Raphire commented 8 months ago

Good news! I have just pushed an experimental update that adds the option to remove OneDrive via winget. I haven't fully tested it, but it seems to work well so far.

After removal any synced folders will still be inside the %USERPROFILE%/OneDrive folder, it doesn't return them to their default location in the user folder. This is a benefit in my book, as users won't 'lose' their files this way, knowledgeable users can manually move their files if they want to.

For the experimental ones among you, the experimental version can be found and downloaded here: https://github.com/Raphire/Win11Debloat/tree/experimental

To remove OneDrive select 'Custom mode' in the script menu, next open the App Selection UI by selecting option 3.

Raphire commented 8 months ago

The ability to uninstall OneDrive has been added in 0d7910e