en-US onedrive computer

Prompt users when they delete multiple OneDrive files on their local computer

Verified with Microsoft OneDrive 26.153.0809.0004 — updated on July 10, 2026

Microsoft OneDrive 26.153.0809.0004

Supported on: At least Windows Server 2008 R2 or Windows 7

Path in the GPO console

Computer Configuration\Administrative Templates\OneDrive

Description

This policy sets the threshold for how many files a user can delete from a local OneDrive folder before the user is notified that the files will also be deleted from the cloud. If you enable this policy, users will see a notification if they delete more than the specified number of files from OneDrive on their local computer. The user will be given the option to continue to remove the cloud files, or restore the local files. Note: Even if you enable this policy, users won't receive notifications if they've selected the "Always remove files" check box on a previous notification, or if they've cleared the "Notify me when many files are deleted in the cloud" check box in OneDrive sync app settings. If you disable this policy, users will not receive a notification when they delete numerous OneDrive files on their local computer. If you do not configure this policy, users will see a notification when they delete more than 200 files within a short period of time.

Registry

HKLM SOFTWARE\Policies\Microsoft\OneDrive

More options available

Options

Number of files:
LocalMassDeleteFileDeleteThreshold decimal - range 0-100000 - default: 200

Export Builder

BETA

Configure the state, scope and options, then generate .reg, PowerShell, Intune and SCCM outputs — or add the setting to a multi-setting collection.

These exports write the registry — this is not a managed GPO.

.reg file

Windows Registry Editor Version 5.00

; Exported from gporais.com
; Policy: Prompt users when they delete multiple OneDrive files on their local computer
; State: Enabled
; Supported on: At least Windows Server 2008 R2 or Windows 7

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive]
"LocalMassDeleteFileDeleteThreshold"=dword:000000c8
More formats (PowerShell, Intune, SCCM)

PowerShell

# Exported from gporais.com
# Policy: Prompt users when they delete multiple OneDrive files on their local computer
# State: Enabled
# Supported on: At least Windows Server 2008 R2 or Windows 7

$path = 'HKLM:\SOFTWARE\Policies\Microsoft\OneDrive'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'LocalMassDeleteFileDeleteThreshold' -Value 200 -Type DWord

Building a multi-setting collection? Add this setting and generate combined .reg / PowerShell / GPO scripts.

Open the Builder

Embed this policy on your site

What to embed
Theme

Adds one script line: the theme follows your site’s appearance and the height fits the content. If your site blocks scripts, the embed follows the visitor’s system theme.

Preview