Open in the explorer

Disable Known Folders

Désactiver les dossiers connus

Type
User
GPO path
User Configuration › Policies › Administrative Templates › Windows Components › File Explorer FR: Configuration utilisateur › Stratégies › Modèles d'administration › Composants Windows › Explorateur de fichiers
Supported on
At least Windows Server 2008 R2 or Windows 7 FR: Au minimum Windows Server 2008 R2 ou Windows 7
ADMX file
WindowsExplorer.admx
Internal name
WindowsExplorer/DisableKnownFolders

Explanation

This policy setting allows you to specify a list of known folders that should be disabled. Disabling a known folder will prevent the underlying file or directory from being created via the known folder API. If the folder exists before the policy is applied, the folder must be manually deleted since the policy only blocks the creation of the folder.

You can specify a known folder using its known folder id or using its canonical name. For example, the Sample Videos known folder can be disabled by specifying {440fcffd-a92b-4739-ae1a-d4a54907c53f} or SampleVideos.

Note: Disabling a known folder can introduce application compatibility issues in applications that depend on the existence of the known folder.

French text from Windows 11 26H2

Ce paramètre de stratégie vous permet de spécifier une liste de dossiers connus à désactiver. La désactivation d’un dossier connu empêche que le fichier ou le répertoire sous-jacent soit créé par le biais de l’API du dossier connu. Si le dossier existe déjà lorsque la stratégie est appliquée, il doit être supprimé manuellement, car la stratégie empêche uniquement la création du dossier.

Vous pouvez spécifier un dossier connu à l’aide de son ID ou de son nom canonique. Par exemple, le dossier connu Vidéos exemples peut être désactivé en spécifiant {440fcffd-a92b-4739-ae1a-d4a54907c53f} ou SampleVideos.

Remarque : la désactivation d’un dossier connu peut entraîner des problèmes de compatibilité dans les applications qui ont besoin du dossier connu pour fonctionner correctement.

Registry

HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer
Value name
DisableKnownFolders
StateValue written
EnabledREG_DWORD = 1
DisabledREG_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: WindowsExplorer/DisableKnownFolders
$k = 'HKCU:\Software\Policies\Microsoft\Windows\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DisableKnownFolders' -Value 1 -Type DWord
$k = 'HKCU:\Software\Policies\Microsoft\Windows\Explorer\DisableKnownFolders'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Disable these Known Folders.
$values = @('<value1>', '<value2>')  # Replace the values with your own
foreach ($v in $values) { Set-ItemProperty -Path $k -Name $v -Value $v -Type String }

Disable

# Disable: WindowsExplorer/DisableKnownFolders
$k = 'HKCU:\Software\Policies\Microsoft\Windows\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DisableKnownFolders' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": WindowsExplorer/DisableKnownFolders
$k = 'HKCU:\Software\Policies\Microsoft\Windows\Explorer'
Remove-ItemProperty -Path $k -Name 'DisableKnownFolders' -ErrorAction SilentlyContinue
$k = 'HKCU:\Software\Policies\Microsoft\Windows\Explorer\DisableKnownFolders'
Remove-Item -Path $k -Recurse -Force -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Disable these Known Folders.Désactiver ces dossiers connusDisableKnownFolders_PromptList (table)listSoftware\Policies\Microsoft\Windows\Explorer\DisableKnownFoldersNumbered values (1, 2, 3…) · additiveREG_SZ (values under the key)

Availability