From b29c4dfa3b0eb890390482b8e71bf15b8c9119a7 Mon Sep 17 00:00:00 2001 From: dado Date: Sat, 18 Oct 2025 15:10:34 +0200 Subject: [PATCH] migliorato suddivisione in categorie --- configwinpc.ps1 | 154 ++++++++++++++++++++++++------------------------ 1 file changed, 76 insertions(+), 78 deletions(-) diff --git a/configwinpc.ps1 b/configwinpc.ps1 index d904a7b..0208a40 100644 --- a/configwinpc.ps1 +++ b/configwinpc.ps1 @@ -352,6 +352,82 @@ foreach ($path in $registryPaths[2..3]) { Write-Host "" +########################################################################################## +# # +# Suggestion # +# # +########################################################################################## + +# Disable Windows notifications, suggestions, and ads +Write-Host -ForegroundColor DarkGray ">>> Turn off Welcome Experience, notifications, suggestions, and ads in Windows <<<" + +# Define registry paths and values to modify +$registryEntries = @( + @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-310093Enabled"; Value = 0 }, + @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-338388Enabled"; Value = 0 }, + @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SystemPaneSuggestionsEnabled"; Value = 0 }, + @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-338389Enabled"; Value = 0 }, + @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SoftLandingEnabled"; Value = 0 }, + @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-338393Enabled"; Value = 0 }, + @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-353694Enabled"; Value = 0 }, + @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-353696Enabled"; Value = 0 }, + @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-353698Enabled"; Value = 0 }, + @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\SystemSettings\AccountNotifications"; Name = "EnableAccountNotifications"; Value = 0 }, + @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\UserProfileEngagement"; Name = "ScoobeSystemSettingEnabled"; Value = 0 }, + @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"; Name = "ShowSyncProviderNotifications"; Value = 0 }, + @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SilentInstalledAppsEnabled"; Value = 0 }, + @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.Suggested"; Name = "Enabled"; Value = 0 }, + @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Mobility"; Name = "OptedIn"; Value = 0 }, + @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"; Name = "Start_AccountNotifications"; Value = 0 } +) + +# Loop through each registry entry and set the values +foreach ($entry in $registryEntries) { + # Create the path if it doesn't exist + if (-not (Test-Path $entry.Path)) { + New-Item -Path $entry.Path -Force | Out-Null + } + + Set-ItemProperty -Path $entry.Path -Name $entry.Name -Value $entry.Value -Type DWORD -Force | Out-Null +} + +########################################################################################## +# # +# Recall # +# # +########################################################################################## + +Write-Host -ForegroundColor DarkGray ">>> Disable Recall <<<" +Write-Host "" + +# Define registry paths for taskbar settings +$RegistryPaths = @( + "HKCU:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI", + "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI" +) + +# Loop through each registry path to check if it exists +foreach ($path in $RegistryPaths) { + # Check if the path does not exist + if (-not (Test-Path $path)) { + New-Item -Path $path -Force | Out-Null # Create the registry path + } +} + +# Disable AI data analysis +Write-Host -ForegroundColor DarkGray ">>> Disable AI data analysis <<<" +foreach ($path in $RegistryPaths[0..1]) { + New-ItemProperty -Path $path -Name "DisableAIDataAnalysis" -Value 1 -Type DWORD -Force | Out-Null +} + +Set-ItemProperty -Path $RegistryPaths[1] -Name "AllowRecallEnablement" -Value 0 -Type DWORD -Force | Out-Null + +# Turn off Recall snapshots +Write-Host -ForegroundColor DarkGray ">>> Turn off Recall snapshots <<<" +Set-ItemProperty -Path $RegistryPaths[1] -Name "TurnOffSavingSnapshots" -Value 1 -Type DWORD -Force | Out-Null + +Write-Host "" + ########################################################################################## # # # Lock Screen Notifications # @@ -434,47 +510,6 @@ foreach ($RegistryPath in $RegistryPaths) { Write-Host "" -########################################################################################## -# # -# Suggestion # -# # -########################################################################################## - -# Disable Windows notifications, suggestions, and ads -Write-Host -ForegroundColor Yellow ">>> Turn off Welcome Experience, notifications, suggestions, and ads in Windows <<<" - -# Define registry paths and values to modify -$registryEntries = @( - @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-310093Enabled"; Value = 0 }, - @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-338388Enabled"; Value = 0 }, - @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SystemPaneSuggestionsEnabled"; Value = 0 }, - @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-338389Enabled"; Value = 0 }, - @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SoftLandingEnabled"; Value = 0 }, - @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-338393Enabled"; Value = 0 }, - @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-353694Enabled"; Value = 0 }, - @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-353696Enabled"; Value = 0 }, - @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-353698Enabled"; Value = 0 }, - @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\SystemSettings\AccountNotifications"; Name = "EnableAccountNotifications"; Value = 0 }, - @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\UserProfileEngagement"; Name = "ScoobeSystemSettingEnabled"; Value = 0 }, - @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"; Name = "ShowSyncProviderNotifications"; Value = 0 }, - @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SilentInstalledAppsEnabled"; Value = 0 }, - @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.Suggested"; Name = "Enabled"; Value = 0 }, - @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Mobility"; Name = "OptedIn"; Value = 0 }, - @{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"; Name = "Start_AccountNotifications"; Value = 0 } -) - -# Loop through each registry entry and set the values -foreach ($entry in $registryEntries) { - # Create the path if it doesn't exist - if (-not (Test-Path $entry.Path)) { - New-Item -Path $entry.Path -Force | Out-Null - } - - Set-ItemProperty -Path $entry.Path -Name $entry.Name -Value $entry.Value -Type DWORD -Force | Out-Null -} - -Write-Host "" - ########################################################################################## # # # Edge # @@ -534,43 +569,6 @@ foreach ($RegistryPath in $RegistryPaths) { Write-Host "" -########################################################################################## -# # -# Recall # -# # -########################################################################################## - -Write-Host -ForegroundColor Yellow ">>> Disable Recall <<<" -Write-Host "" - -# Define registry paths for taskbar settings -$RegistryPaths = @( - "HKCU:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI", - "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI" -) - -# Loop through each registry path to check if it exists -foreach ($path in $RegistryPaths) { - # Check if the path does not exist - if (-not (Test-Path $path)) { - New-Item -Path $path -Force | Out-Null # Create the registry path - } -} - -# Disable AI data analysis -Write-Host -ForegroundColor DarkGray ">>> Disable AI data analysis <<<" -foreach ($path in $RegistryPaths[0..1]) { - New-ItemProperty -Path $path -Name "DisableAIDataAnalysis" -Value 1 -Type DWORD -Force | Out-Null -} - -Set-ItemProperty -Path $RegistryPaths[1] -Name "AllowRecallEnablement" -Value 0 -Type DWORD -Force | Out-Null - -# Turn off Recall snapshots -Write-Host -ForegroundColor DarkGray ">>> Turn off Recall snapshots <<<" -Set-ItemProperty -Path $RegistryPaths[1] -Name "TurnOffSavingSnapshots" -Value 1 -Type DWORD -Force | Out-Null - -Write-Host "" - ########################################################################################## # # # Power Plan #