Time (in seconds) to force reboot when required for policy changes to take effect
Délai (en secondes) pour forcer le redémarrage afin d’appliquer des modifications de stratégie
Explanation
This policy setting establishes the amount of time (in seconds) that the system will wait to reboot in order to enforce a change in device installation restriction policies.
If you enable this policy setting, set the amount of seconds you want the system to wait until a reboot.
If you disable or do not configure this policy setting, the system does not force a reboot.
Note: If no reboot is forced, the device installation restriction right will not take effect until the system is restarted.
Ce paramètre de stratégie établit le délai (en secondes) au terme duquel le système doit redémarrer pour appliquer une modification dans les stratégies de restriction d’installation de périphérique.
Si vous activez ce paramètre de stratégie, définissez le délai d’attente (en secondes) avant le redémarrage du système.
Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, le système n’effectue pas de redémarrage forcé.
Remarque : si aucun redémarrage forcé n’est prévu, la stratégie de restriction d’installation de périphérique ne prendra pas effet tant que le système n’aura pas été redémarré.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions- Value name
ForceReboot
| 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: DeviceInstallation/DeviceInstall_Policy_RebootTime
$k = 'HKLM:\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ForceReboot' -Value 1 -Type DWord
# Reboot Timeout (in seconds)
Set-ItemProperty -Path $k -Name 'RebootTime' -Value 120 -Type DWord # between 0 and 4294968Disable
# Disable: DeviceInstallation/DeviceInstall_Policy_RebootTime
$k = 'HKLM:\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ForceReboot' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": DeviceInstallation/DeviceInstall_Policy_RebootTime
$k = 'HKLM:\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions'
Remove-ItemProperty -Path $k -Name 'ForceReboot' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'RebootTime' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| Reboot Timeout (in seconds)Délai d’attente de redémarrage (en secondes)DeviceInstall_Policy_RebootTime_Time | Numeric boxdecimal | RebootTime | REG_DWORD | Min: 0 · Max: 4294968 · Default (UI): 120 |