Open in the explorer

Remove Shared Documents from My Computer

Supprimer les Documents partagés du Poste de travail

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
Windows XP Professional only FR: Windows XP Professionnel uniquement
ADMX file
WindowsExplorer.admx
Internal name
WindowsExplorer/NoMyComputerSharedDocuments

Explanation

This policy setting allows you to remove the Shared Documents folder from My Computer.

When a Windows client is in a workgroup, a Shared Documents icon appears in the File Explorer Web view under "Other Places" and also under "Files Stored on This Computer" in My Computer. Using this policy setting, you can choose not to have these items displayed.

If you enable this policy setting, the Shared Documents folder is not displayed in the Web view or in My Computer.

If you disable or do not configure this policy setting, the Shared Documents folder is displayed in Web view and also in My Computer when the client is part of a workgroup.

Note: The ability to remove the Shared Documents folder via Group Policy is only available on Windows XP Professional.

French text from Windows 11 26H2

Ce paramètre de stratégie permet de supprimer le dossier Documents partagés de Poste de travail.

Lorsqu’un client Windows se trouve dans un groupe de travail, une icône Documents partagés apparaît dans l’affichage Web de l’Explorateur de fichiers sous « Autres emplacements » et également sous « Fichiers enregistrés sur cet ordinateur » dans le Poste de travail. Ce paramètre de stratégie permet de choisir l’affichage ou non de ces éléments.

Si vous activez ce paramètre de stratégie, le dossier Documents partagés n’apparaît ni dans l’affichage Web ni dans le Poste de travail.

Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, le dossier Documents partagés apparaît dans l’affichage Web et dans le Poste de travail lorsque le client fait partie d’un groupe de travail.

Remarque : la possibilité de supprimer le dossier Documents partagés via la stratégie de groupe n’est disponible que sous Windows XP Professionnel.

Registry

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Value name
NoSharedDocuments
StateValue written
Enablednot defined in the ADMX
Disablednot 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/NoMyComputerSharedDocuments
$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 'NoSharedDocuments' -Value 1 -Type DWord  # assumed value (not defined in the ADMX)

Disable

# Disable: WindowsExplorer/NoMyComputerSharedDocuments
$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 'NoSharedDocuments' -Value 0 -Type DWord  # assumed value (not defined in the ADMX)

Revert to "Not configured"

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

Availability