Open in the explorer

Set the maximum size of a user's OneDrive that can download automatically

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

Explanation

This setting is used in conjunction with "Silently sign in users to the OneDrive sync app with their Windows credentials." This setting lets you prompt users who have more than a specified amount of content in OneDrive to choose folders to sync during setup of the OneDrive sync app (OneDrive.exe).

If you enable this setting, users who have more content than the value you specify will be shown the Choose Folders dialog box by default during OneDrive Setup.

If you disable or do not configure this setting, when users set up the sync app, all files will be selected to sync.

Use cases

Sets the maximum size of a OneDrive that downloads automatically during silent sign-in (beyond it, the user is prompted to choose folders). On devices without Files On-Demand, it avoids filling a laptop's disk with a huge OneDrive.

With Files On-Demand this threshold is ignored; OneDrive also asks users to choose folders when free space would drop below 1 GB.

Microsoft source: Silently configure user accounts

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/DiskSpaceCheckThresholdMB
$k = 'HKLM:\Software\Policies\Microsoft\OneDrive\DiskSpaceCheckThresholdMB'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Max size
$items = @{
    '<name1>' = '<value1>'
    '<name2>' = '<value2>'
}  # Replace the values with your own
$items.GetEnumerator() | ForEach-Object { Set-ItemProperty -Path $k -Name $_.Key -Value $_.Value -Type String }

Disable

# Disable: OneDrive/DiskSpaceCheckThresholdMB
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": OneDrive/DiskSpaceCheckThresholdMB
$k = 'HKLM:\Software\Policies\Microsoft\OneDrive\DiskSpaceCheckThresholdMB'
Remove-Item -Path $k -Recurse -Force -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Max size:DiskSpaceCheckThresholdMBListList (table)listSoftware\Policies\Microsoft\OneDrive\DiskSpaceCheckThresholdMBName = value pairs · additiveREG_SZ (values under the key)

Application

Microsoft OneDrive (Microsoft) — October 2026 templates

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