Remove "Map Network Drive" and "Disconnect Network Drive"
Supprimer les options « Connecter un lecteur réseau » et « Déconnecter un lecteur réseau »
Explanation
Prevents users from using File Explorer or Network Locations to map or disconnect network drives.
If you enable this setting, the system removes the Map Network Drive and Disconnect Network Drive commands from the toolbar and Tools menus in File Explorer and Network Locations and from menus that appear when you right-click the File Explorer or Network Locations icons.
This setting does not prevent users from connecting to another computer by typing the name of a shared folder in the Run dialog box.
Note:
This setting was documented incorrectly on the Explain tab in Group Policy for Windows 2000. The Explain tab states incorrectly that this setting prevents users from connecting and disconnecting drives.
Note: It is a requirement for third-party applications with Windows 2000 or later certification to adhere to this setting.
Empêche les utilisateurs de connecter ou déconnecter des lecteurs réseau dans l’Explorateur de fichiers ou les emplacements réseau.
Si vous activez ce paramètre, le système supprimera les commandes Connecter un lecteur réseau et Déconnecter un lecteur réseau de la barre d’outils et des menus Outils de l’Explorateur de fichiers et des emplacements réseau, et des menus qui apparaissent lorsque vous cliquez avec le bouton droit sur les icônes de l’Explorateur de fichiers ou des emplacements réseau.
Ce paramètre n’empêche pas les utilisateurs de se connecter à un autre ordinateur en tapant le nom d’un dossier partagé dans la boîte de dialogue Exécuter.
Remarque :
Ce paramètre n’était pas correctement documenté dans l’onglet Explication de la stratégie de groupe de Windows 2000. En effet, celui-ci indiquait de manière incorrecte que ce paramètre empêchait les utilisateurs de se connecter et de se déconnecter des lecteurs.
Remarque : les applications tierces sous Windows 2000 ou un niveau de certification supérieur doivent respecter ce paramètre.
Registry
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer- Value name
NoNetConnectDisconnect
| State | Value written |
|---|---|
| Enabled | not defined in the ADMX |
| Disabled | not defined in the ADMX |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
The ADMX does not specify the value written when enabled; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled). The commands below use 1/0 as an assumption.
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/NoNetConnectDisconnect
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'NoNetConnectDisconnect' -Value 1 -Type DWord # assumed value (not defined in the ADMX)Disable
# Disable: WindowsExplorer/NoNetConnectDisconnect
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'NoNetConnectDisconnect' -Value 0 -Type DWord # assumed value (not defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": WindowsExplorer/NoNetConnectDisconnect
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
Remove-ItemProperty -Path $k -Name 'NoNetConnectDisconnect' -ErrorAction SilentlyContinue