Hide and disable all items on the desktop
Masquer et désactiver tous les éléments du Bureau
Explanation
Removes icons, shortcuts, and other default and user-defined items from the desktop, including Briefcase, Recycle Bin, Computer, and Network Locations.
Removing icons and shortcuts does not prevent the user from using another method to start the programs or opening the items they represent.
Also, see "Items displayed in Places Bar" in User Configuration\Administrative Templates\Windows Components\Common Open File Dialog to remove the Desktop icon from the Places Bar. This will help prevent users from saving data to the Desktop.
Supprime les icônes, les raccourcis ainsi que les autres éléments par défaut et définis par l’utilisateur du Bureau, y compris le Porte-documents, la Corbeille, le Poste de travail et les Emplacements réseau.
La suppression d’icônes et de raccourcis n’empêche pas les utilisateurs d’utiliser une autre méthode pour démarrer les applications ou ouvrir les éléments qu’ils représentent.
Consultez également « Éléments affichés dans la barre des Favoris » dans Configuration utilisateur\Modèles d’administration\Composants Windows\Boîte de dialogue commune Ouvrir un fichier afin de supprimer l’icône du Bureau de la barre des Favoris. Ce paramètre peut contribuer à empêcher les utilisateurs d’enregistrer des données vers le Bureau.
Registry
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\ExplorerHKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer- Value name
NoDesktop
| 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.
Computer (HKLM)
Enable
# Enable: Desktop/NoDesktop
$k = 'HKLM:\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 'NoDesktop' -Value 1 -Type DWord # assumed value (not defined in the ADMX)Disable
# Disable: Desktop/NoDesktop
$k = 'HKLM:\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 'NoDesktop' -Value 0 -Type DWord # assumed value (not defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": Desktop/NoDesktop
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
Remove-ItemProperty -Path $k -Name 'NoDesktop' -ErrorAction SilentlyContinueUser (HKCU)
Enable
Disable
Revert to "Not configured"