Set maximum duration for storing snapshots used by Recall
Définir la durée maximale de stockage des instantanés utilisés par Retrouver
Explanation
This policy setting allows you to control the maximum amount of time (in days) that Windows saves snapshots for Recall.
When the policy is enabled, you can configure the maximum storage duration to be 30, 60, 90, or 180 days.
When this policy is not configured, the maximum storage duration is 90 days unless the current user specifies a different value.
If both maximum storage duration and maximum storage space are set for Recall, then snapshots are deleted when the first maximum is reached.
Important: This setting applies to Enterprise and Education client SKUs only.
Ce paramètre de stratégie vous permet de contrôler la durée maximale (en jours) pendant laquelle Windows enregistre des instantanés pour Retrouver.
Lorsque la stratégie est activée, vous pouvez configurer la durée de stockage maximale sur 30, 60, 90 ou 180 jours.
Lorsque cette stratégie n’est pas configurée, la durée de stockage maximale est de 90 jours, sauf si l'utilisateur actuel spécifie une valeur différente.
Si la durée de stockage maximale et l'espace de stockage maximal sont définis pour Retrouver, alors les instantanés sont supprimés lorsque le premier maximum est atteint.
Important : ce paramètre s’applique uniquement aux références SKU client Entreprise et Éducation.
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsAIHKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\WindowsAI- Value name
SetMaximumStorageDurationForRecallSnapshots
| State | Value written |
|---|---|
| Enabled | not defined in the ADMX (see the options below) |
| Disabled | 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.
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.
Computer (HKLM)
Enable
# Enable: WindowsCopilot/SetMaximumStorageDurationForRecallSnapshots
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI'
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 'SetMaximumStorageDurationForRecallSnapshots' -Value 1 -Type DWord # assumed value (not defined in the ADMX)
# Select maximum storage duration
# Possible options:
# Let the OS define the maximum amount of time the snapshots will be saved = 0
# 30 days = 30
# 60 days = 60
# 90 days = 90
# 180 days = 180
Set-ItemProperty -Path $k -Name 'SetMaximumStorageDurationForRecallSnapshots' -Value 0 -Type DWordDisable
# Disable: WindowsCopilot/SetMaximumStorageDurationForRecallSnapshots
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI'
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 'SetMaximumStorageDurationForRecallSnapshots' -Value 0 -Type DWord # assumed value (not defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": WindowsCopilot/SetMaximumStorageDurationForRecallSnapshots
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI'
Remove-ItemProperty -Path $k -Name 'SetMaximumStorageDurationForRecallSnapshots' -ErrorAction SilentlyContinueUser (HKCU)
Enable
Disable
Revert to "Not configured"
Options (1)
| Label | Control | Registry value | REG type | Constraints / details | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Select maximum storage duration:Sélectionner la durée de stockage maximal :SetMaximumStorageDuration_Text | Drop-down listenum | SetMaximumStorageDurationForRecallSnapshots | REG_DWORD | Default choice (UI): #0
|