Turn off the "Publish to Web" task for files and folders
Désactiver l’option Publier sur le Web de la Gestion des fichiers
Explanation
This policy setting specifies whether the tasks "Publish this file to the Web," "Publish this folder to the Web," and "Publish the selected items to the Web" are available from File and Folder Tasks in Windows folders.
The Web Publishing Wizard is used to download a list of providers and allow users to publish content to the web.
If you enable this policy setting, these tasks are removed from the File and Folder tasks in Windows folders.
If you disable or do not configure this policy setting, the tasks are shown.
Ce paramètre de stratégie indique si les tâches « Publier ce fichier sur le Web », « Publier ce dossier sur le Web » et « Publier les éléments sélectionnés sur le Web » sont affichées dans le volet Gestion des fichiers dans les dossiers Windows.
L’Assistant Publication de pages Web est utilisé pour télécharger une liste de fournisseurs et permettre aux utilisateurs de publier des pages Web.
Si vous activez ce paramètre de stratégie, ces tâches sont supprimées du volet Gestion des fichiers dans les dossiers Windows.
Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, les tâches sont affichées.
Registry
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer- Value name
NoPublishingWizard
| 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: ICM/ShellRemovePublishToWeb_2
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'NoPublishingWizard' -Value 1 -Type DWordDisable
# Disable: ICM/ShellRemovePublishToWeb_2
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'NoPublishingWizard' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": ICM/ShellRemovePublishToWeb_2
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
Remove-ItemProperty -Path $k -Name 'NoPublishingWizard' -ErrorAction SilentlyContinue