Prevent access to drives from My Computer
Empêcher l’accès aux lecteurs à partir du Poste de travail
Explanation
Prevents users from using My Computer to gain access to the content of selected drives.
If you enable this setting, users can browse the directory structure of the selected drives in My Computer or File Explorer, but they cannot open folders and access the contents. Also, they cannot use the Run dialog box or the Map Network Drive dialog box to view the directories on these drives.
To use this setting, select a drive or combination of drives from the drop-down list. To allow access to all drive directories, disable this setting or select the "Do not restrict drives" option from the drop-down list.
Note: The icons representing the specified drives still appear in My Computer, but if users double-click the icons, a message appears explaining that a setting prevents the action.
Also, this setting does not prevent users from using programs to access local and network drives. And, it does not prevent them from using the Disk Management snap-in to view and change drive characteristics.
Also, see the "Hide these specified drives in My Computer" setting.
Empêche les utilisateurs d’utiliser le Poste de travail pour accéder au contenu des lecteurs sélectionnés.
Si vous activez ce paramètre, les utilisateurs pourront parcourir la structure de répertoires des lecteurs sélectionnés dans le Poste de travail ou l’Explorateur de fichiers, mais ils ne pourront pas ouvrir des dossiers pour accéder à leur contenu. Ils ne pourront pas non plus utiliser la boîte de dialogue Exécuter ou la boîte de dialogue Connecter un lecteur réseau pour afficher les répertoires sur ces lecteurs.
Pour utiliser ce paramètre, sélectionnez un lecteur ou une combinaison de lecteurs dans la liste déroulante. Pour autoriser l’accès à tous les répertoires des lecteurs, désactivez ce paramètre ou sélectionnez l’option « Ne pas restreindre les lecteurs » dans la liste déroulante.
Remarque : les icônes représentant les lecteurs spécifiés apparaîtront toujours dans le Poste de travail, mais si les utilisateurs double-cliquent sur les icônes, un message s’affichera pour expliquer qu’un paramètre interdit cette action.
En outre, ce paramètre n’empêche pas les utilisateurs d’accéder aux lecteurs réseau et locaux 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.
Consultez également le paramètre « Dans Poste de travail, masquer ces lecteurs spécifiés ».
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/NoViewOnDrive
$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 'NoViewOnDrive' -Value 67108863 -Type DWordDisable
# Disable: WindowsExplorer/NoViewOnDrive
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": WindowsExplorer/NoViewOnDrive
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
Remove-ItemProperty -Path $k -Name 'NoViewOnDrive' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Pick one of the following combinationsChoisissez l’une des combinaisons suivantesNoDrivesDropdown | Drop-down listenum | NoViewOnDrive | REG_DWORD | Required · Default choice (UI): #5
|