Disallow optical media as backup target
Ne pas autoriser un média optique à faire office de cible de sauvegarde
Explanation
This policy setting allows you to manage whether backups of a machine can run to an optical media or not.
If you enable this policy setting, machine administrator/backup operator cannot use Windows Server Backup to run backups to an optical media.
If you disable or do not configure this policy setting, there is no restriction on optical media being backup target.
Ce paramètre de stratégie permet d’indiquer si les sauvegardes d’un ordinateur peuvent s’exécuter ou non sur un média optique.
Si vous activez ce paramètre de stratégie, 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 média optique.
Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, un média optique pourra faire office de cible de sauvegarde.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Backup\Server- Value name
NoBackupToOptical
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_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/DisallowOpticalMediaAsBackupTarget
$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 'NoBackupToOptical' -Value 1 -Type DWordDisable
# Disable: WindowsBackup/DisallowOpticalMediaAsBackupTarget
$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 'NoBackupToOptical' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": WindowsBackup/DisallowOpticalMediaAsBackupTarget
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Backup\Server'
Remove-ItemProperty -Path $k -Name 'NoBackupToOptical' -ErrorAction SilentlyContinue