Enable optimized move of contents in Offline Files cache on Folder Redirection server path change
Autoriser le déplacement optimisé de contenu dans le cache des fichiers hors connexion lors de la modification du chemin d’accès au serveur de redirection de dossiers
Explanation
This policy setting controls whether the contents of redirected folders is copied from the old location to the new location or simply renamed in the Offline Files cache when a folder is redirected to a new location.
If you enable this policy setting, when the path to a redirected folder is changed from one network location to another and Folder Redirection is configured to move the content to the new location, instead of copying the content to the new location, the cached content is renamed in the local cache and not copied to the new location. To use this policy setting, you must move or restore the server content to the new network location using a method that preserves the state of the files, including their timestamps, before updating the Folder Redirection location.
If you disable or do not configure this policy setting, when the path to a redirected folder is changed and Folder Redirection is configured to move the content to the new location, Windows copies the contents of the local cache to the new network location, then deleted the content from the old network location.
Ce paramètre de stratégie contrôle si le contenu des dossiers redirigés est copié de l’ancien emplacement vers le nouveau ou est simplement renommé dans le cache des fichiers hors connexion lorsqu’un dossier est redirigé vers un nouvel emplacement.
Si vous activez ce paramètre de stratégie, lorsque le chemin d’accès à un dossier redirigé est modifié pour passer d’un emplacement réseau à un autre et que la redirection de dossiers est configurée pour déplacer le contenu vers le nouvel emplacement, au lieu de copier le contenu vers le nouvel emplacement, le contenu mis en cache est renommé dans le cache local et n’est pas copié vers le nouvel emplacement. Pour utiliser ce paramètre de stratégie, vous devez déplacer ou restaurer le contenu serveur vers le nouvel emplacement réseau en utilisant une méthode qui préserve l’état des fichiers, notamment leur horodatage, avant de mettre à jour l’emplacement de réplication de dossiers.
Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, lorsque le chemin d’accès à un dossier redirigé est modifié et que la redirection de dossiers est configurée pour déplacer le contenu vers le nouvel emplacement, Windows copie le contenu du cache local vers le nouvel emplacement réseau, puis supprime le contenu de l’ancien emplacement réseau.
Registry
HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\Fdeploy- Value name
FolderRedirectionEnableCacheRename
| 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: FolderRedirection/FolderRedirectionEnableCacheRename
$k = 'HKCU:\Software\Policies\Microsoft\Windows\System\Fdeploy'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'FolderRedirectionEnableCacheRename' -Value 1 -Type DWordDisable
# Disable: FolderRedirection/FolderRedirectionEnableCacheRename
$k = 'HKCU:\Software\Policies\Microsoft\Windows\System\Fdeploy'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'FolderRedirectionEnableCacheRename' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": FolderRedirection/FolderRedirectionEnableCacheRename
$k = 'HKCU:\Software\Policies\Microsoft\Windows\System\Fdeploy'
Remove-ItemProperty -Path $k -Name 'FolderRedirectionEnableCacheRename' -ErrorAction SilentlyContinue