Prevent users from moving their Windows known folders to OneDrive
Explanation
This setting prevents users from moving their Documents, Pictures, and Desktop folders to any OneDrive for Business account.
Note: Moving known folders to personal OneDrive accounts is already blocked on domain-joined PCs.
If you enable this setting, users won't be prompted with the "Set up protection of important folders" window, and the "Start protection" command will be disabled. If the user has already moved their known folders, the files in those folders will remain in OneDrive. To redirect the known folders back to the user's device, please select "No." This setting will not take effect if you enable "Prompt users to move Windows known folders to OneDrive" or "Silently move Windows known folders to OneDrive."
If you disable or do not configure this setting, users can choose to move their known folders.
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive- Value name
- not defined in the ADMX
Enable / disable values: not defined in the ADMX (see the options below).
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/BlockKnownFolderMove
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\OneDrive'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# For users who have already moved their known folders, would you like to keep those folders redirected to OneDrive
# Possible options:
# Yes = 1
# No = 2
Set-ItemProperty -Path $k -Name 'KFMBlockOptIn' -Value 1 -Type DWordDisable
# Disable: OneDrive/BlockKnownFolderMove
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": OneDrive/BlockKnownFolderMove
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\OneDrive'
Remove-ItemProperty -Path $k -Name 'KFMBlockOptIn' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| For users who have already moved their known folders, would you like to keep those folders redirected to OneDrive:BlockKnownFolderMove_Dropdown | Drop-down listenum | KFMBlockOptIn | REG_DWORD | Default choice (UI): #0
|
Application
Microsoft OneDrive (Microsoft) — October 2026 templates
October 2026 templates from pl4nty/web-admx-tool.