Agent Consent Duration
Durée du consentement de l’agent
Explanation
Specifies how long, in hours, an “Allow” consent response for agent capabilities remains valid before the user is prompted again.
If this policy is enabled, the value must be from 1 (1 hour) to 8760 (1 year). The configured value is used as the default expiration time for all “Allow” consent responses for agent capabilities.
If this policy is not configured, or if the value is outside the allowed range, the default is 720 hours (30 days).
Spécifie la durée, en heures, pendant laquelle une réponse de consentement « Autoriser » pour les fonctionnalités de l’agent reste valide avant que l’utilisateur ne soit invité à nouveau.
Si cette stratégie est activée, la valeur doit être comprise entre 1 (1 heure) et 8760 (1 an). La valeur configurée est utilisée comme délai d’expiration par défaut pour toutes les réponses de consentement « Autoriser » pour les fonctionnalités de l’agent.
Si cette stratégie n’est pas configurée ou si la valeur est en dehors de la plage autorisée, la valeur par défaut est de 720 heures (30 jours).
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsAI- Value name
- not defined in the ADMX
Enable / disable values: not defined in the ADMX (see the options below).
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: CAM_AI/AgentConsentDuration
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsAI'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Consent duration (hours)
Set-ItemProperty -Path $k -Name 'AgentConsentDuration' -Value 720 -Type DWord # between 1 and 8760Disable
# Disable: CAM_AI/AgentConsentDuration
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": CAM_AI/AgentConsentDuration
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsAI'
Remove-ItemProperty -Path $k -Name 'AgentConsentDuration' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| Consent duration (hours):Durée du consentement (heures) :AgentConsentDuration_Value | Numeric boxdecimal | AgentConsentDuration | REG_DWORD | Min: 1 · Max: 8760 · Default (UI): 720 |