Open in the explorer

Disallow locally attached storage as backup target

Ne pas autoriser un périphérique de stockage connecté localement à faire office de cible de sauvegarde

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Backup › Server FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Backup › Serveur
Supported on
At least Windows Server 2008 FR: Au minimum Windows Server 2008
ADMX file
WindowsBackup.admx
Internal name
WindowsBackup/DisallowLocallyAttachedStorageAsBackupTarget

Explanation

This policy setting allows you to manage whether backups of a machine can run to locally attached storage or not.

If you enable this policy setting, machine administrator/backup operator cannot use Windows Server Backup to run backups to a locally attached storage or disk.

If you disable or do not configure this policy setting, there is no restriction on locally attached storage or disk being backup target.

French text from Windows 11 26H2

Ce paramètre de stratégie permet d’indiquer si les sauvegardes d’un ordinateur peuvent s’exécuter ou non sur un périphérique de stockage connecté localement.

Si vous activez ce paramètre, l’administrateur de l’ordinateur ou l’opérateur de sauvegarde ne pourra pas utiliser l’utilitaire Sauvegarde de Windows Server pour exécuter des sauvegardes sur un périphérique de stockage ou un disque connecté localement.

Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, un périphérique de stockage ou un disque connecté localement pourra faire office de cible de sauvegarde.

Registry

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

Disable

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

Revert to "Not configured"

# Revert to "Not configured": WindowsBackup/DisallowLocallyAttachedStorageAsBackupTarget
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Backup\Server'
Remove-ItemProperty -Path $k -Name 'NoBackupToDisk' -ErrorAction SilentlyContinue

Availability