Open in the explorer

Prohibit Task Deletion

Empêcher la suppression de tâches

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Task Scheduler FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Planificateur de tâches
Supported on
Windows Server 2003, Windows XP, and Windows 2000 only FR: Windows Server 2003, Windows XP et Windows 2000 uniquement
ADMX file
TaskScheduler.admx
Internal name
TaskScheduler/TaskDeletion_2

Explanation

Prevents users from deleting tasks from the Scheduled Tasks folder.

This setting removes the Delete command from the Edit menu in the Scheduled Tasks folder and from the menu that appears when you right-click a task. Also, the system does not respond when users try to cut or drag a task from the Scheduled Tasks folder.

Note: This setting appears in the Computer Configuration and User Configuration folders. If both settings are configured, the setting in Computer Configuration takes precedence over the setting in User Configuration.

Important: This setting does not prevent administrators of a computer from using At.exe to delete tasks.

French text from Windows 11 26H2

Empêche les utilisateurs de supprimer des tâches du dossier Tâches planifiées.

Ce paramètre supprime la commande Supprimer dans le menu Edition du dossier Tâches planifiées, ainsi que dans le menu qui apparaît quand vous cliquez sur une tâche avec le bouton droit de la souris. En outre, le système ne répond pas lorsque les utilisateurs essaient de couper ou de faire glisser une tâche à partir du dossier Tâches planifiées.

Remarque : ce paramètre apparaît dans les dossiers Configuration ordinateur et Configuration utilisateur. Si les deux paramètres sont configurés, le paramètre défini dans Configuration ordinateur prévaut sur le paramètre défini dans Configuration utilisateur.

Important : ce paramètre n'empêche pas les administrateurs d'un ordinateur d'utiliser la commande At.exe pour supprimer des tâches.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Task Scheduler5.0
Value name
Task Deletion
StateValue written
Enablednot defined in the ADMX
Disablednot defined in the ADMX

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

The ADMX does not specify the value written when enabled; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled). The commands below use 1/0 as an assumption.

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: TaskScheduler/TaskDeletion_2
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Task Scheduler5.0'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'Task Deletion' -Value 1 -Type DWord  # assumed value (not defined in the ADMX)

Disable

# Disable: TaskScheduler/TaskDeletion_2
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Task Scheduler5.0'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'Task Deletion' -Value 0 -Type DWord  # assumed value (not defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": TaskScheduler/TaskDeletion_2
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Task Scheduler5.0'
Remove-ItemProperty -Path $k -Name 'Task Deletion' -ErrorAction SilentlyContinue

Availability