Open in the explorer

Prevent users from syncing personal OneDrive accounts

Type
User
GPO path
User Configuration › Policies › Administrative Templates › OneDrive
Supported on
At least Windows Server 2008 R2 or Windows 7
ADMX file
OneDrive.admx
Internal name
OneDrive/DisablePersonalSync

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
StateValue written
EnabledREG_DWORD = 1
DisabledREG_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 DWord

Disable

# 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 DWord

Revert to "Not configured"

# Revert to "Not configured": OneDrive/DisablePersonalSync
$k = 'HKCU:\SOFTWARE\Policies\Microsoft\OneDrive'
Remove-ItemProperty -Path $k -Name 'DisablePersonalSync' -ErrorAction SilentlyContinue

Application

Microsoft OneDrive (Microsoft) — October 2026 templates

October 2026 templates from pl4nty/web-admx-tool.