Allow DFS roots to be published
Permettre à des racines DFS d’être publiées
Explanation
This policy setting determines whether the user can publish DFS roots 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 to publish DFS roots as shared folders in AD DS .
If you disable this policy setting, users cannot publish DFS roots 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.
Ce paramètre de stratégie détermine si l’utilisateur peut publier des racines DFS 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 » pour publier des racines DFS en tant que dossiers partagés dans Active Directory.
Si vous désactivez ce paramètre de stratégie, les utilisateurs ne peuvent pas publier de racines DFS dans AD 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
PublishDfsRoots
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_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/PublishDfsRoots
$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 'PublishDfsRoots' -Value 1 -Type DWordDisable
# Disable: SharedFolders/PublishDfsRoots
$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 'PublishDfsRoots' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": SharedFolders/PublishDfsRoots
$k = 'HKCU:\Software\Policies\Microsoft\Windows NT\SharedFolders'
Remove-ItemProperty -Path $k -Name 'PublishDfsRoots' -ErrorAction SilentlyContinue