Open in the explorer

Save documents to OneDrive by default

Enregistrer les documents sur OneDrive par défaut

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › OneDrive FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › OneDrive
Supported on
Windows Server 2012 R2, Windows 8.1 or Windows RT 8.1 only FR: Windows Server 2012 R2, Windows 8.1 ou Windows RT 8.1 uniquement
ADMX file
SkyDrive.admx
Internal name
SkyDrive/DisableLibrariesDefaultSaveToOneDrive

Explanation

This policy setting lets you disable OneDrive as the default save location. It does not prevent apps and users from saving files on OneDrive. If you disable this policy setting, files will be saved locally by default. Users will still be able to change the value of this setting to save to OneDrive by default. They will also be able to open and save files on OneDrive using the OneDrive app and file picker, and packaged Microsoft Store apps will still be able to access OneDrive using the WinRT API. If you enable or do not configure this policy setting, users with a connected account will save documents to OneDrive by default.

French text from Windows 11 26H2

Ce paramètre de stratégie vous permet de désactiver OneDrive en tant qu’emplacement d’enregistrement par défaut. Il n’empêche pas les applications et les utilisateurs d’enregistrer des fichiers sur OneDrive. Si vous désactivez ce paramètre de stratégie, les fichiers seront enregistrés localement par défaut. Les utilisateurs auront toujours la possibilité de modifier la valeur de ce paramètre pour effectuer des enregistrements sur OneDrive par défaut. Ils seront également en mesure d’ouvrir et d’enregistrer des fichiers sur OneDrive à l’aide de l’application OneDrive et du sélecteur de fichiers, et les applications empaquetées du Microsoft Store pourront toujours accéder à OneDrive à l’aide de l’API WinRT. Si vous activez ou ne configurez pas ce paramètre de stratégie, les utilisateurs disposant d’un compte connecté enregistreront les documents sur OneDrive par défaut.

Registry

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

Disable

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

Revert to "Not configured"

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

Availability