Disable OneDrive in Windows 10

This script will disable OneDrive. Microsoft has integrated OneDrive as one of the built-in features of Windows 10. You cannot “delete” this feature anymore, but you can disable it to prevent the application from running. We will use two reg files DisableOneDriveExplorerDisable.reg and DisableOneDriveFileSync.reg to disable OneDrive and remove explorer icon. However, before you can apply the registry, you will need to take owenership of the registry key. You can use SetACL.exe Application. see DisableOneDrive.cmd

Disable Default User Profile from running OneDriveSetup


reg load "hku\Default" "C:\Users\Default\NTUSER.DAT" 
reg delete HKU\default\software\Microsoft\Windows\CurrentVersion\Run /v OneDriveSetup /f
reg unload "hku\Default"

%~dp0SetACL.exe -on "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" -ot reg -actn setowner -ownr n:Administrators
%~dp0SetACL.exe -on "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" -ot reg -actn ace -ace "n:Administrators;p:full"

reg import %~dp0DisableOneDriveFileSync.reg
reg import %~dp0DisableOneDriveExplorerDisable.reg

Disable OneDrive Explorer


Windows Registry Editor Version 5.00


Disable OneDrive Group Policy Settings


Windows Registry Editor Version 5.00


MDT Application import

  1. Download & Extract Action-DisableOneDrive.zip
  2. Import as Application Action-DisableOneDrive
  3. Run Command: cmd.exe /c DisableOneDrive.cmd
  4. Use as a Task Sequence in your reference / deployment image



Github Source

comments powered by Disqus