Open in the explorer

Hide these specified drives in My Computer

Dans Poste de travail, masquer ces lecteurs spécifiés

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 2000 FR: Au minimum Windows 2000
ADMX file
WindowsExplorer.admx
Internal name
WindowsExplorer/NoDrives

Explanation

This policy setting allows you to hide these specified drives in My Computer.

This policy setting allows you to remove the icons representing selected hard drives from My Computer and File Explorer. Also, the drive letters representing the selected drives do not appear in the standard Open dialog box.

If you enable this policy setting, select a drive or combination of drives in the drop-down list.

Note: This policy setting removes the drive icons. Users can still gain access to drive contents by using other methods, such as by typing the path to a directory on the drive in the Map Network Drive dialog box, in the Run dialog box, or in a command window.

Also, this policy setting does not prevent users from using programs to access these drives or their contents. And, it does not prevent users from using the Disk Management snap-in to view and change drive characteristics.

If you disable or do not configure this policy setting, all drives are displayed, or select the "Do not restrict drives" option in the drop-down list.

Also, see the "Prevent access to drives from My Computer" policy setting.

French text from Windows 11 26H2

Ce paramètre de stratégie permet de masquer les lecteurs spécifiés dans Poste de travail.

Ce paramètre de stratégie supprime les icônes représentant les disques durs sélectionnés du Poste de travail et de l’Explorateur de fichiers. En outre, les lettres représentant les lecteurs sélectionnés n’apparaissent pas dans la boîte de dialogue Ouvrir standard.

Si vous activez ce paramètre de stratégie, sélectionnez un lecteur ou une combinaison de lecteurs dans la liste déroulante.

Remarque : ce paramètre de stratégie supprime les icônes de lecteur. Les utilisateurs peuvent toujours accéder au contenu du lecteur en utilisant d’autres méthodes, par exemple en entrant le chemin d’accès à un répertoire sur le lecteur dans la boîte de dialogue Connecter un lecteur réseau, dans la boîte de dialogue Exécuter, ou dans une fenêtre d’invite de commandes.

En outre, ce paramètre de stratégie n’empêche pas les utilisateurs d’accéder à ces lecteurs ou à leur contenu par le biais de programmes. Il ne les empêche pas non plus d’utiliser le composant logiciel enfichable Gestion des disques pour afficher et modifier les caractéristiques des lecteurs.

Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, tous les lecteurs sont affichés. Vous pouvez également sélectionner l’option « Ne pas restreindre les lecteurs » dans la liste déroulante.

Consultez également le paramètre de stratégie « Empêcher l’accès aux lecteurs à partir du Poste de travail ».

Registry

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
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: WindowsExplorer/NoDrives
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Pick one of the following combinations
# Possible options:
#   Restrict A and B drives only = 3
#   Restrict C drive only = 4
#   Restrict D drive only = 8
#   Restrict A, B and C drives only = 7
#   Restrict A, B, C and D drives only = 15
#   Restrict all drives = 67108863
#   Do not restrict drives = 0
Set-ItemProperty -Path $k -Name 'NoDrives' -Value 67108863 -Type DWord

Disable

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

Revert to "Not configured"

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

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Pick one of the following combinationsChoisissez l’une des combinaisons suivantesNoDrivesDropdownDrop-down listenumNoDrivesREG_DWORD
Required · Default choice (UI): #5
LabelValue
Restrict A and B drives onlyREG_DWORD = 3
Restrict C drive onlyREG_DWORD = 4
Restrict D drive onlyREG_DWORD = 8
Restrict A, B and C drives onlyREG_DWORD = 7
Restrict A, B, C and D drives onlyREG_DWORD = 15
Restrict all drivesREG_DWORD = 67108863
Do not restrict drivesREG_DWORD = 0

Availability