/ / How to uninstall onedrive windows 10 for all users

How to uninstall onedrive windows 10 for all users?

0

4sysops - The online community for SysAdmins and DevOps

  • Author and member of the year 2019 – Why DevOps still doesn't rule the IT world - Wed, Jan 1 2020
  • Results of the 4sysops member and author competition in 2018 - Tue, Jan 8 2019
  • Why Microsoft is using Windows customers as guinea pigs - Reply to Tim Warner - Tue, Dec 18 2018
  • Why remove OneDrive?
  • Remove OneDrive from File Explorer
  • Disable OneDrive via Group Policy
  • Disable OneDrive through the Registry on Windows 10 Home
  • Uninstall OneDrive on Windows 10
  • Conclusion

Cloud drives such as OneDrive are useful for sharing files across multiple devices. However, in a corporate environment, cloud drives can cause headaches for admins.

Why remove OneDrive? ^

One concern is that confidential data could leave your corporate network, which might be against your company’s policy. If a user’s OneDrive account gets hacked because of a weak password or because the phone is stolen, sensitive data might get compromised.

Many organizations don’t really have confidential data. I still would feel uncomfortable if my users stored data outside the company network, however, because it is difficult to ensure that user data is backed up properly and, in the end, you are the one who has to deal with the matter.

You might argue that Microsoft certainly makes backups of OneDrive. However, these are Microsoft’s backups—not yours, and not those of your users. If a user inadvertently makes unwanted changes to a file, you have no way of restoring the file if you don’t create backups of your desktop computers. Unlike Dropbox or OneDrive for Business, OneDrive doesn’t allow users to restore previous file versions, which is a must-have feature for every professional environment. If you use your own servers to provide cloud drive functionality, for instance with Work Folders, you can easily create central backups.

Another thing to consider is that, if you leave the default configuration untouched and allow users to work with OneDrive, you also have to provide support if problems come up. You will then be responsible not only for your corporate computers but also for the users’ private devices, where any app could have messed with the user’s OneDrive files.

You see, good reasons exist to disable or uninstall OneDrive on your Windows 10 computers.

Remove OneDrive from File Explorer ^

Many sites and forums offer instructions on how to remove the OneDrive icon from File Explorer. This icon is certainly a problem because it encourages users to store data in Microsoft’s cloud.

OneDrive icon in File Explorer

If you set System.IsPinnedToNameSpaceTree in HKEY_CLASSES_ROOT > CLSID > <018D5C66-4533-4307-9B53-224DE2ED1FE6> to 0, the OneDrive icon will disappear from File Explorer almost instantly.

OneDrive icon is missing in File Explorer

The problem with this method is that it doesn’t really remove OneDrive. Users can still access it through the Start menu, the systray icon, and their profile folder (%USERPROFILE%OneDrive). Thus, this solution only makes sense if you don’t intend to disallow the usage of OneDrive yet you don’t want to explicitly encourage users.

Disable OneDrive via Group Policy ^

A more reliable way of removing OneDrive is to disable it via Group Policy:

Computer Configuration > Administrative Templates > Windows Components > OneDrive > Prevent the usage of OneDrive for file storage

If you enable this policy, the OneDrive icon will disappear after a restart of the computer, and users or applications will no longer be able to sync files with OneDrive.

However, a big trap exists here: if you configure this policy on a Windows Server 2012 R2 machine with the default ADMX templates, OneDrive will be unaffected on Windows 10 computers even though the policy claims that it applies to at least Windows 8.1 or Windows RT 8.1.

The old OneDrive policy that doesn’t work on Windows 10

The policy disables OneDrive on Window 10 computers only if you use the ADMX template for Windows 10. You can easily verify which ADMX template you are working with. The supported-on field of the newer policy, which also works for Windows 10, contains “At least Windows Server 2008 R2 or Windows 7” instead of “at least Windows 8.1 or Windows RT 8.1.” It appears that Windows 10 has a bug here.

The OneDrive Group Policy for Windows 10

If you enable OneDrive again, the OneDrive icon does not reappear in File Explorer. The registry hack discussed above cannot bring back the icon, either. However, if you re-enable the policy, users can access OneDrive through the systray icon and Start. The only way I found to bring back the icon in File Explorer is to uninstall and reinstall OneDrive (see below).

Disable OneDrive through the Registry on Windows 10 Home ^

If you want to disable OneDrive on Windows 10 Home, you can’t do so with the Group Policy editor. In this case, you have to edit the Registry. First, you have to create a new key with the name OneDrive in HKEY_LOCAL_MACHINE > Software > Policies > Microsoft > Windows (right-click). Then, you have to create a new DWORD (32-bit) value with the name DisableFileSyncNGSC under the new OneDrive key and set it to 1.

Disable OneDrive in Registry

After you sign out and sign in again, the OneDrive icon will have disappeared from File Explorer, and OneDrive can no longer sync data with the Microsoft cloud.

Uninstall OneDrive on Windows 10 ^

The Group Policy reliably disables OneDrive. However, if you feel for security reasons that only software that is actually required should be installed, you can also uninstall OneDrive.

Most sites recommend to first kill the OneDrive process. However, in my case, it also worked without this step. Just in case you run into trouble, you can kill OneDrive with this command:

On a 32-bit Windows installation, you can then uninstall OneDrive with this command:

And, on Windows 10 x64, this command will remove OneDrive:

To install OneDrive again, you just have to replace the /uninstall switch with /install.

As mentioned above, this procedure also brings back the OneDrive icon in File Explorer after you disable and re-enable OneDrive through Group Policy.

It is interesting to note that uninstalling OneDrive doesn’t remove the icon from File Explorer. However, if the user clicks the icon, the main pane in File Explorer will stay empty.

OneDrive folder stays empty after OneDrive has been uninstalled

The funny thing is that, if you disable OneDrive through Group Policy and you then uninstall OneDrive, the icon will reappear in File Explorer. I suppose that is another Windows 10 bug.

Conclusion ^

Microsoft did a better job with the policy for disabling OneDrive than with the policy that allows you to move from Edge to Internet Explorer in your network because the policy also removes OneDrive entry points. Unfortunately, the policy contains bugs and might cause you some inconvenience if you should decide to re-enable OneDrive later.

Also take into account that users can always use a web browser to upload files to a cloud drive. However, the main point of disabling OneDrive is to discourage users from storing company data on external sources.

My experience has been that things like OneDrive and that "Get Office 365" adware come back after certain Windows 10 updates are installed. Same thing happened after the "November Update" OneDrive and "Get Office 365" were removed, but they came back after the update. How do we remove these things permanently?

Tim, did the OneDrive icon come back after you disabled it via Group Policy?

As usual, great article! Any luck with figuring out how to disable the "Set up OneDrive" prompt? This is the window that prompts an end user for Email Address to setup OneDrive. This window does not seem to go away when disabling or turning off OneDrive.

I think this prompt did not exist when I wrote the article. The policy disallows the usage of OneDrive, so if this prompt still shows up, something went wrong. Did you reboot the computer and did you verify that OneDrive is really disabled?

Leave a reply Click here to cancel the reply

Follow 4sysops

Subscribe to post notfications

Leaderboards

Reviews

  • Veeam Backup for Office 365 v4 Tue, May 12 2020
  • Advanced Installer: Application packing for IT pros and developers Thu, May 7 2020
  • Specops Password Notification: Notify end users of expired passwords via email Tue, May 5 2020
  • Altaro VM Backup 8: Reliable and easy-to-configure backup for Hyper-V and VMware Tue, Apr 28 2020
  • Parallels Remote Application Server: hypervisor-agnostic application virtualization Tue, Apr 21 2020
  • WuInstall: Windows Updates with a command Mon, Apr 20 2020
  • EventSentry 4.1: Monitor expiring passwords, pending reboots, and performance metrics with a Hybrid SIEM Wed, Apr 15 2020
  • VisualCron: Automate without programming skills on Windows Tue, Feb 25 2020
  • Altaro Office 365 backup: Exchange Online, OneDrive and SharePoint backup in Azure Tue, Feb 4 2020
  • Securden Windows Privilege Manager: Remove local admin rights, enforce least privilege Thu, Jan 30 2020
  • SystemTools Hyena: Simplify Active Directory management Thu, Dec 5 2019
  • ScriptRunner Version 2019R2: PowerShell scripting for teams with self-service Wed, Dec 4 2019
  • Specops Key Recovery: Self-service for unlocking BitLocker-encrypted devices Thu, Oct 24 2019
  • Remote Desktop Manager: A powerful and full-featured connection manager Tue, Oct 22 2019
  • 3CX VoIP phone system v16: New features and improvements Wed, Apr 24 2019
  • Condusiv Undelete 11: New features Thu, Feb 14 2019
  • Turn the tables on your organization with Adaxes 2018.1's Web Interface and reporting capabilities Thu, Sep 20 2018
  • ManageEngine Desktop Central 9 - Powerful desktop & mobile device management Wed, Oct 28 2015

Site Wide Activities [RSS]

Thank you for your update. Editing now works fine >

Comments:
Comment on
reload, if the code cannot be seen