@@ -2095,6 +2095,26 @@ Function ShowQuickAccess {
20952095 Remove-ItemProperty - Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" - Name " HubMode" - ErrorAction SilentlyContinue
20962096}
20972097
2098+ # Hide Recycle Bin shortcut from desktop
2099+ Function HideRecycleBinFromDesktop {
2100+ Write-Output " Hiding Recycle Bin shortcut from desktop..."
2101+ If (! (Test-Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" )) {
2102+ New-Item - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" - Force | Out-Null
2103+ }
2104+ Set-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" - Name " {645FF040-5081-101B-9F08-00AA002F954E}" - Type DWord - Value 1
2105+ If (! (Test-Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" )) {
2106+ New-Item - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" - Force | Out-Null
2107+ }
2108+ Set-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" - Name " {645FF040-5081-101B-9F08-00AA002F954E}" - Type DWord - Value 1
2109+ }
2110+
2111+ # Show Recycle Bin shortcut on desktop
2112+ Function ShowRecycleBinOnDesktop {
2113+ Write-Output " Showing Recycle Bin shortcut on desktop..."
2114+ Remove-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" - Name " {645FF040-5081-101B-9F08-00AA002F954E}" - ErrorAction SilentlyContinue
2115+ Remove-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" - Name " {645FF040-5081-101B-9F08-00AA002F954E}" - ErrorAction SilentlyContinue
2116+ }
2117+
20982118# Show This PC shortcut on desktop
20992119Function ShowThisPCOnDesktop {
21002120 Write-Output " Showing This PC shortcut on desktop..."
@@ -2155,6 +2175,26 @@ Function HideControlPanelFromDesktop {
21552175 Remove-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" - Name " {5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0}" - ErrorAction SilentlyContinue
21562176}
21572177
2178+ # Show Network shortcut on desktop
2179+ Function ShowNetworkOnDesktop {
2180+ Write-Output " Showing Network shortcut on desktop..."
2181+ If (! (Test-Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" )) {
2182+ New-Item - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" - Force | Out-Null
2183+ }
2184+ Set-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" - Name " {F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" - Type DWord - Value 0
2185+ If (! (Test-Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" )) {
2186+ New-Item - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" - Force | Out-Null
2187+ }
2188+ Set-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" - Name " {F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" - Type DWord - Value 0
2189+ }
2190+
2191+ # Hide Network shortcut from desktop
2192+ Function HideNetworkFromDesktop {
2193+ Write-Output " Hiding Network shortcut from desktop..."
2194+ Remove-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" - Name " {F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" - ErrorAction SilentlyContinue
2195+ Remove-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" - Name " {F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" - ErrorAction SilentlyContinue
2196+ }
2197+
21582198# Hide Desktop icon from This PC - The icon remains in personal folders and open/save dialogs
21592199Function HideDesktopFromThisPC {
21602200 Write-Output " Hiding Desktop icon from This PC..."
0 commit comments