Open in the explorer

Agent Consent Duration

Durée du consentement de l’agent

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Windows AI FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Windows AI
Supported on
At least Windows 11 Pro, Enterprise, or Education with Windows Sandbox FR: Au moins Windows 11 Professionnel, Enterprise ou Education avec Bac à sable Windows
ADMX file
CAM_AI.admx
Internal name
CAM_AI/AgentConsentDuration

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).

French text from Windows 11 26H2

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 8760

Disable

# 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 SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Consent duration (hours):Durée du consentement (heures) :AgentConsentDuration_ValueNumeric boxdecimalAgentConsentDurationREG_DWORD
Min: 1 · Max: 8760 · Default (UI): 720

Availability

Windows 11

✓ 26H2— 25H2— 24H2— 23H2— 22H2— 21H2

Windows 10

— 22H2— 21H2— 21H1— 20H2— 2004— 1909— 1903— 1809— 1803— 1709— 1703— 1607— 1511— 1507

Windows Server

— 2025— 2022— 2016