Open in the explorer

Allow shared folders to be published

Permettre à des dossiers partagés d’être publiés

Type
User
GPO path
User Configuration › Policies › Administrative Templates › Shared Folders FR: Configuration utilisateur › Stratégies › Modèles d'administration › Dossiers partagés
Supported on
At least Windows Server 2003 operating systems or Windows XP Professional FR: Au minimum Windows Server 2003 ou Windows XP Professionnel
ADMX file
SharedFolders.admx
Internal name
SharedFolders/PublishSharedFolders

Explanation

This policy setting determines whether the user can publish shared folders in Active Directory Domain Services (AD DS).

If you enable or do not configure this policy setting, users can use the "Publish in Active Directory" option in the Shared Folders snap-in to publish shared folders in AD DS.

If you disable this policy setting, users cannot publish shared folders in AD DS, and the "Publish in Active Directory" option is disabled. Note: The default is to allow shared folders to be published when this setting is not configured.

French text from Windows 11 26H2

Ce paramètre de stratégie détermine si l’utilisateur peut publier des dossiers partagés dans les services de domaine Active Directory (AD DS).

Si vous activez ou ne configurez pas ce paramètre de stratégie, les utilisateurs peuvent utiliser l’option « Publier dans Active Directory » dans le composant logiciel enfichable Dossiers partagés pour publier des dossiers partagés dans AD DS.

Si vous désactivez ce paramètre de stratégie, les utilisateurs ne peuvent pas publier de dossiers partagés dans AS DS et l’option « Publier dans Active Directory » est désactivée. Remarque : la valeur par défaut est d’autoriser la publication de dossiers partagés lorsque ce paramètre n’est pas configuré.

Registry

HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows NT\SharedFolders
Value name
PublishSharedFolders
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: SharedFolders/PublishSharedFolders
$k = 'HKCU:\Software\Policies\Microsoft\Windows NT\SharedFolders'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'PublishSharedFolders' -Value 1 -Type DWord

Disable

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

Revert to "Not configured"

# Revert to "Not configured": SharedFolders/PublishSharedFolders
$k = 'HKCU:\Software\Policies\Microsoft\Windows NT\SharedFolders'
Remove-ItemProperty -Path $k -Name 'PublishSharedFolders' -ErrorAction SilentlyContinue

Availability