Open in the explorer

Use OneDrive Files On-Demand

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › OneDrive
Supported on
At least Windows Server 2016, Windows 10 Version 1709
ADMX file
OneDrive.admx
Internal name
OneDrive/FilesOnDemandEnabled

Explanation

This setting lets you control whether OneDrive Files On-Demand is enabled for your organization.

If you enable this setting, OneDrive Files On-Demand will be turned on by default.

If you disable this setting, OneDrive Files On-Demand will be explicitly disabled and users can't turn it on.

If you do not configure this setting, users can turn OneDrive Files On-Demand on or off.

Use cases

Manages OneDrive Files On-Demand, which shows cloud files in File Explorer without downloading them until you open them. When enabled, the feature is on by default for new users of the sync app; when disabled, it is explicitly off and users cannot turn it back on; when not configured, each user chooses. It requires Windows 10 version 1709 or later.

Microsoft recommends leaving it enabled; on a machine where the option is missing from settings even though Windows is recent enough, check the Cloud Files filter driver (CldFlt): its Start value must be 2.

Microsoft source: Use OneDrive Files On-Demand

Registry

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive
Value name
FilesOnDemandEnabled
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/FilesOnDemandEnabled
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\OneDrive'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'FilesOnDemandEnabled' -Value 1 -Type DWord

Disable

# Disable: OneDrive/FilesOnDemandEnabled
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\OneDrive'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'FilesOnDemandEnabled' -Value 0 -Type DWord

Revert to "Not configured"

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

Application

Microsoft OneDrive (Microsoft) — October 2026 templates

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