From 29e25d5905cac3a888fde2bcbf85cdb3a4de9d97 Mon Sep 17 00:00:00 2001 From: X9 Date: Sun, 15 Mar 2026 18:24:47 +0100 Subject: [PATCH] Add This PC desktop icon, hide Start menu recommendations, remove LinkedIn - 04-default-profile.ps1 + 05-personalization.ps1: show This PC icon on desktop via HideDesktopIcons CLSID {20D04FE0...} = 0 - 03-system-registry.ps1: HideRecommendedSection = 1 hides Win11 Start menu Recommended section (HKLM policy) - 04-default-profile.ps1: Start_TrackProgs = 0 and Start_TrackDocs = 0 hide recently added/opened items from Start menu - 01-bloatware.ps1: add 7EE7776C.LinkedInforWindows to removal list - tests/Test-Deployment.ps1: add checks for all three new settings Co-Authored-By: Claude Sonnet 4.6 --- scripts/01-bloatware.ps1 | 1 + scripts/03-system-registry.ps1 | 6 ++++++ scripts/04-default-profile.ps1 | 16 +++++++++++++++- scripts/05-personalization.ps1 | 6 ++++++ tests/Test-Deployment.ps1 | 9 +++++++++ 5 files changed, 37 insertions(+), 1 deletion(-) diff --git a/scripts/01-bloatware.ps1 b/scripts/01-bloatware.ps1 index d0f311a..db78de4 100644 --- a/scripts/01-bloatware.ps1 +++ b/scripts/01-bloatware.ps1 @@ -62,6 +62,7 @@ $AppxToRemove = @( "Microsoft.YourPhone" "Microsoft.ZuneMusic" "Microsoft.ZuneVideo" + "7EE7776C.LinkedInforWindows" ) # Packages to always keep diff --git a/scripts/03-system-registry.ps1 b/scripts/03-system-registry.ps1 index 3b08fbe..e296349 100644 --- a/scripts/03-system-registry.ps1 +++ b/scripts/03-system-registry.ps1 @@ -307,4 +307,10 @@ Set-Reg -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" ` Set-Reg -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI" ` -Name "DisableAIDataAnalysis" -Value 1 +# ----------------------------------------------------------------------- +# Start menu - hide Recommended section (Win11) +# ----------------------------------------------------------------------- +Set-Reg -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" ` + -Name "HideRecommendedSection" -Value 1 + Write-Log "Step 3 complete" -Level OK diff --git a/scripts/04-default-profile.ps1 b/scripts/04-default-profile.ps1 index 60acfa3..332a6fe 100644 --- a/scripts/04-default-profile.ps1 +++ b/scripts/04-default-profile.ps1 @@ -158,6 +158,13 @@ try { Set-ProfileReg -SubKey "Software\Microsoft\Windows\CurrentVersion\Explorer" ` -Name "EnableAutoTray" -Value 0 + # ----------------------------------------------------------------------- + # Desktop icons - show This PC + # ----------------------------------------------------------------------- + # CLSID {20D04FE0-3AEA-1069-A2D8-08002B30309D} = This PC / Computer + Set-ProfileReg -SubKey "Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" ` + -Name "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" -Value 0 + # ----------------------------------------------------------------------- # Start menu settings # ----------------------------------------------------------------------- @@ -168,12 +175,19 @@ try { -Name "DisableSearchBoxSuggestions" -Value 1 # Win11: empty Start menu pins - $startPinsPath = "Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" Set-ProfileReg -SubKey "Software\Microsoft\Windows\CurrentVersion\Start" ` -Name "ConfigureStartPins" ` -Value '{"pinnedList":[]}' ` -Type "String" + # Hide "Recently added" apps in Start menu + Set-ProfileReg -SubKey "Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" ` + -Name "Start_TrackProgs" -Value 0 + + # Hide recently opened files/docs from Start menu + Set-ProfileReg -SubKey "Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" ` + -Name "Start_TrackDocs" -Value 0 + # ----------------------------------------------------------------------- # Copilot - disable # ----------------------------------------------------------------------- diff --git a/scripts/05-personalization.ps1 b/scripts/05-personalization.ps1 index 0e78771..957806e 100644 --- a/scripts/05-personalization.ps1 +++ b/scripts/05-personalization.ps1 @@ -87,6 +87,12 @@ function Apply-ThemeSettings { Set-Reg -Path "$HiveRoot\Control Panel\Desktop" ` -Name "TileWallpaper" -Value "0" -Type "String" + + # ----------------------------------------------------------------------- + # Desktop icons - show This PC + # ----------------------------------------------------------------------- + Set-Reg -Path "$HiveRoot\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" ` + -Name "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" -Value 0 } # ----------------------------------------------------------------------- diff --git a/tests/Test-Deployment.ps1 b/tests/Test-Deployment.ps1 index 7045d74..9e35d8e 100644 --- a/tests/Test-Deployment.ps1 +++ b/tests/Test-Deployment.ps1 @@ -211,6 +211,15 @@ Test-Check "File extensions visible" { Test-Check "Explorer opens to This PC" { (Get-RegValue "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "LaunchTo") -eq 1 } +Test-Check "This PC icon on desktop" { + (Get-RegValue "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" "{20D04FE0-3AEA-1069-A2D8-08002B30309D}") -eq 0 +} +Test-Check "Start menu Recommended section hidden" { + (Get-RegValue "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" "HideRecommendedSection") -eq 1 +} +Test-Check "Start menu recently added hidden" { + (Get-RegValue "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "Start_TrackProgs") -eq 0 +} # ----------------------------------------------------------------------- # Scheduled tasks