Open in the explorer

Exclude directories in roaming profile

Exclure des répertoires dans les profils itinérants

Type
User
GPO path
User Configuration › Policies › Administrative Templates › System › User Profiles FR: Configuration utilisateur › Stratégies › Modèles d'administration › Système › Profils utilisateur
Supported on
At least Windows 2000 FR: Au minimum Windows 2000
ADMX file
UserProfiles.admx
Internal name
UserProfiles/ExcludeDirectories

Explanation

This policy setting lets you exclude folders that are normally included in the user's profile. As a result, these folders do not need to be stored by the network server on which the profile resides and do not follow users to other computers.

Note: When excluding content from the profile you should try to exclude the narrowest set of data that will address your needs. For example, if there is one application with data that should not be roamed then add only that application's specific folder under the AppData\Roaming folder rather than all of the AppData\Roaming folder to the exclusion list.

By default, the Appdata\Local and Appdata\LocalLow folders and all their subfolders such as the History, Temp, and Temporary Internet Files folders are excluded from the user's roaming profile.

In operating systems earlier than Microsoft Windows Vista, only the History, Local Settings, Temp, and Temporary Internet Files folders are excluded from the user's roaming profile by default.

If you enable this policy setting, you can exclude additional folders.

If you disable this policy setting or do not configure it, only the default folders are excluded.

Note: You cannot use this policy setting to include the default folders in a roaming user profile.

French text from Windows 11 26H2

Ce paramètre de stratégie permet d’exclure des dossiers qui sont normalement inclus dans le profil de l’utilisateur. Par conséquent, ces dossiers n’ont pas besoin d’être stockés sur le serveur réseau sur lequel se trouve le profil et ils ne suivent pas les utilisateurs vers d’autres ordinateurs.

Remarque : lors de l’exclusion de contenu du profil, vous devez essayer d’exclure le jeu de données répondant au plus près à vos besoins. Par exemple, si une application contient des données qui ne doivent pas être déplacées, ajoutez le dossier spécifique de cette application sous le dossier AppData\Roaming plutôt que d’ajouter tout le dossier AppData\Roaming à la liste d’exclusion.

Par défaut, les dossiers Appdata\Local et Appdata\LocalLow et tous leurs sous-dossiers, tels que Historique, Temp et Temporary Internet Files sont exclus du profil itinérant de l’utilisateur.

Dans les systèmes d’exploitation antérieurs à Microsoft Windows Vista, seuls les dossiers Historique, Local Settings, Temp et Temporary Internet Files sont exclus par défaut du profil itinérant de l’utilisateur.

Si vous activez ce paramètre de stratégie, vous pouvez exclure des dossiers supplémentaires.

Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, seuls les dossiers par défaut sont exclus.

Remarque : vous ne pouvez pas utiliser ce paramètre de stratégie pour inclure les dossiers par défaut dans un profil utilisateur itinérant.

Registry

HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System
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: UserProfiles/ExcludeDirectories
$k = 'HKCU:\Software\Policies\Microsoft\Windows\System'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Prevent the following directories from roaming with the profile
Set-ItemProperty -Path $k -Name 'ExcludeProfileDirs' -Value '<value>' -Type String

Disable

# Disable: UserProfiles/ExcludeDirectories
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": UserProfiles/ExcludeDirectories
$k = 'HKCU:\Software\Policies\Microsoft\Windows\System'
Remove-ItemProperty -Path $k -Name 'ExcludeProfileDirs' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Prevent the following directories from roaming with the profile:Empêcher les répertoires suivants de circuler avec le profil :ExcludeMessageText boxtextExcludeProfileDirsREG_SZ
Max length: 4096

Availability