Prevent users from syncing personal OneDrive accounts
Explanation
This setting lets you block users from signing in with a Microsoft account to sync their personal OneDrive files.
If you enable this setting, users will be prevented from setting up a sync relationship for their personal OneDrive account. Users who are already syncing their personal OneDrive when you enable this setting won't be able to continue syncing (and will be shown a message that syncing has stopped), but any files synced to the computer will remain on the computer.
OneDrive Photos and Microsoft Photos also honor this setting. If you enable this setting, photos from personal Microsoft accounts won't appear in the gallery.
If you disable or do not configure this setting, users can sync their personal OneDrive accounts.
Use cases
Prevents syncing personal OneDrive accounts with the work client, which avoids business data ending up in personal storage. Users already syncing a personal account see a sync-stopped message; files already on the machine stay there.
Microsoft source: Use OneDrive policies to control sync settings
Registry
HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\OneDrive- Value name
DisablePersonalSync
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: OneDrive/DisablePersonalSync
$k = 'HKCU:\SOFTWARE\Policies\Microsoft\OneDrive'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DisablePersonalSync' -Value 1 -Type DWordDisable
# Disable: OneDrive/DisablePersonalSync
$k = 'HKCU:\SOFTWARE\Policies\Microsoft\OneDrive'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DisablePersonalSync' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": OneDrive/DisablePersonalSync
$k = 'HKCU:\SOFTWARE\Policies\Microsoft\OneDrive'
Remove-ItemProperty -Path $k -Name 'DisablePersonalSync' -ErrorAction SilentlyContinueApplication
Microsoft OneDrive (Microsoft) — October 2026 templates
October 2026 templates from pl4nty/web-admx-tool.