Prevent Task Run or End
Empêcher l'exécution et l'arrêt des tâches
Explanation
Prevents users from starting and stopping tasks manually.
This setting removes the Run and End Task items from the context menu that appears when you right-click a task. As a result, users cannot start tasks manually or force tasks to end before they are finished.
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.
Empêche les utilisateurs de démarrer et d'arrêter des tâches manuellement.
Ce paramètre supprime les éléments Démarrer et Arrêter la tâche du menu contextuel qui apparaît quand vous cliquez sur une tâche avec le bouton droit de la souris. Par conséquent, les utilisateurs ne peuvent pas démarrer les tâches manuellement ou forcer les tâches à se terminer avant qu'elles ne soient terminées.
Remarque : ce paramètre apparaît dans les dossiers Configuration de l'ordinateur et Configuration de l'utilisateur. Si les deux paramètres sont configurés, le paramètre défini dans Configuration de l'ordinateur prévaut sur le paramètre défini dans Configuration de l'utilisateur.
Registry
HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Task Scheduler5.0- Value name
Execution
| State | Value written |
|---|---|
| Enabled | not defined in the ADMX |
| Disabled | not 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/Execution_1
$k = 'HKCU:\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 'Execution' -Value 1 -Type DWord # assumed value (not defined in the ADMX)Disable
# Disable: TaskScheduler/Execution_1
$k = 'HKCU:\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 'Execution' -Value 0 -Type DWord # assumed value (not defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": TaskScheduler/Execution_1
$k = 'HKCU:\Software\Policies\Microsoft\Windows\Task Scheduler5.0'
Remove-ItemProperty -Path $k -Name 'Execution' -ErrorAction SilentlyContinue