Exclude directories in roaming profile: registry value ExcludeProfileDirsUserHKCU\Software\Policies\Microsoft\Windows\System
- Policy ID
- ExcludeDirectories
- Scope
- User Configuration
- Supported on
- At least Windows 2000
- Source
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
- Category
- System › User Profiles
Registry
ExcludeProfileDirs
REG_SZUserHKCU\Software\Policies\Microsoft\Windows\System Current key
- Enabled value
- Depends on the option value
- Element
- Prevent the following directories from roaming with the profile:
- Value type
- REG_SZ
- Maximum length
- 4096
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System] ; Value names and types follow the ADMX. Replace <enter value> below with your own data "ExcludeProfileDirs"="<enter value>"
CMD
:: Value names and types follow the ADMX. Replace <enter value> below with your own data reg add "HKCU\Software\Policies\Microsoft\Windows\System" /v "ExcludeProfileDirs" /t REG_SZ /d "<enter value>" /f
PowerShell
# Value names and types follow the ADMX. Replace <enter value> below with your own data New-Item -Path 'HKCU:\Software\Policies\Microsoft\Windows\System' -Force | Out-Null New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\System' -Name 'ExcludeProfileDirs' -PropertyType String -Value '<enter value>' -Force | Out-Null