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
DisableOneDrive.cmd
Disable OneDrive Explorer
DisableOneDriveExplorerDisable.reg
Disable OneDrive Group Policy Settings
DisableOneDriveFileSync.reg
MDT Application import
Download & Extract Action-DisableOneDrive.zip
Import as Application Action-DisableOneDrive
Run Command: cmd.exe /c DisableOneDrive.cmd
Use as a Task Sequence in your reference / deployment image