In certain scenarios, you may notice OneDrive loading even when there is no account linked to it. This article guides you on how to manage Microsoft OneDrive (Personal) synchronization on Windows machines using the Registry Editor (Regedit). Here you will find the steps and quick scripts (.reg) to disable loading, re-enable it, or completely remove the applied policy.
How to Disable OneDrive Personal
If you need to prevent users from syncing their personal Microsoft accounts (OneDrive Personal) on the corporate device, you should enable the block policy. This is done by changing the value of the DisablePersonalSync key to 1.
Create a text file, rename it to disable_onedrive_personal.reg, and insert the following code, or use the disable_onedrive_personal.reg file already created in the attachment available at the end of the article:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\OneDrive]
"DisablePersonalSync"=dword:00000001How to Re-enable OneDrive Personal (Revert)
To revert the previous action and explicitly allow syncing of personal accounts, we need to change the policy by informing Windows that the block is disabled (changing the value to 0).
Create a text file, rename it to enable_onedrive_personal.reg, and insert the following code, or use the enable_onedrive_personal.reg file already created in the attachment available at the end of the article:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\OneDrive]
"DisablePersonalSync"=dword:00000000How to Completely Remove the Policy
In some cases, the best practice is not to set the value to "0" or "1", but rather to remove the policy key from the registry. This returns Windows to its default behavior, as if the policy had never been configured. To do this via a registry script, we use the minus sign (-) after the equal sign.
Create a text file, rename it to remove_onedrive_personal.reg, and insert the following code, or use the remove_onedrive_personal.reg file already created in the attachment available at the end of the article:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\OneDrive]
"DisablePersonalSync"=-Restart the system to test the effectiveness of the policy.