⚡ PowerShell 5.1+
Show Recycle Bin Icon on Desktop
Adds the Recycle Bin icon back to the desktop.
Set-ShowRecycleBinOnDesktop.ps1
<#
.SYNOPSIS
Show Recycle Bin Icon on Desktop.
.DESCRIPTION
Adds the Recycle Bin icon back to the desktop.
Sets HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel \ {645FF040-5081-101B-9F08-00AA002F954E} to 0.
.EXAMPLE
.\Set-ShowRecycleBinOnDesktop.ps1
#>
[CmdletBinding()]
param()
$regPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel'
if (-not (Test-Path $regPath)) {
New-Item -Path $regPath -Force | Out-Null
}
New-ItemProperty -Path $regPath -Name '{645FF040-5081-101B-9F08-00AA002F954E}' -Value 0 -PropertyType DWord -Force | Out-Null
Write-Host "Show Recycle Bin Icon on Desktop applied. Sign out and back in (or restart explorer.exe) for it to fully take effect." -ForegroundColor Green