From 66151da11da434d38175ae6a2b271fb1c7a61efd Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Thu, 16 May 2024 21:56:43 +0300 Subject: [PATCH] Added StartRecommendationsTips & StartAccountNotifications functions --- Wrapper/Config/config_Windows_10.json | 16 +++ Wrapper/Config/config_Windows_11.json | 18 ++- .../de-DE/tooltip_Windows_10.json | 16 ++- .../de-DE/tooltip_Windows_11.json | 20 ++- .../en-US/tooltip_Windows_10.json | 16 ++- .../en-US/tooltip_Windows_11.json | 20 ++- .../ru-RU/tooltip_Windows_10.json | 18 ++- .../ru-RU/tooltip_Windows_11.json | 20 ++- .../Module/Sophia.psm1 | 53 +++++++ src/Sophia_Script_for_Windows_10/Sophia.ps1 | 8 ++ .../Module/Sophia.psm1 | 53 +++++++ .../Sophia.ps1 | 10 ++ .../Module/Sophia.psm1 | 74 +++++++--- src/Sophia_Script_for_Windows_11/Sophia.ps1 | 20 ++- .../Module/Sophia.psm1 | 130 +++++++++++++++--- .../Sophia.ps1 | 20 ++- 16 files changed, 453 insertions(+), 59 deletions(-) diff --git a/Wrapper/Config/config_Windows_10.json b/Wrapper/Config/config_Windows_10.json index bca99d66..01598627 100644 --- a/Wrapper/Config/config_Windows_10.json +++ b/Wrapper/Config/config_Windows_10.json @@ -281,6 +281,22 @@ "Preset": "Zero", "WindowsDefault": "One" }, + { + "Region": "Privacy & Telemetry", + "Control": "cmb", + "Required": "false", + "Function": "StartRecommendationsTips", + "Arg": { + "Zero": { + "Tag": "Hide" + }, + "One": { + "Tag": "Show" + } + }, + "Preset": "Zero", + "WindowsDefault": "One" + }, { "Region": "UI & Personalization", "Control": "cmb", diff --git a/Wrapper/Config/config_Windows_11.json b/Wrapper/Config/config_Windows_11.json index 4a3bf187..719cf094 100644 --- a/Wrapper/Config/config_Windows_11.json +++ b/Wrapper/Config/config_Windows_11.json @@ -285,7 +285,23 @@ "Region": "Privacy & Telemetry", "Control": "cmb", "Required": "false", - "Function": "BrowsingHistory", + "Function": "StartRecommendationsTips", + "Arg": { + "Zero": { + "Tag": "Hide" + }, + "One": { + "Tag": "Show" + } + }, + "Preset": "Zero", + "WindowsDefault": "One" + }, + { + "Region": "Privacy & Telemetry", + "Control": "cmb", + "Required": "false", + "Function": "StartAccountNotifications", "Arg": { "Zero": { "Tag": "Hide" diff --git a/Wrapper/Localizations/de-DE/tooltip_Windows_10.json b/Wrapper/Localizations/de-DE/tooltip_Windows_10.json index f3096a43..38531e46 100644 --- a/Wrapper/Localizations/de-DE/tooltip_Windows_10.json +++ b/Wrapper/Localizations/de-DE/tooltip_Windows_10.json @@ -243,6 +243,20 @@ } } }, + { + "Region": "Privacy & Telemetry", + "Function": "StartRecommendationsTips", + "Arg": { + "Zero": { + "Tag": "Hide", + "ToolTip": "Microsoft-Kontobezogene Benachrichtigungen werden im Startmenü nicht angezeigt." + }, + "One": { + "Tag": "Show", + "ToolTip": "Zeigen Sie Benachrichtigungen zu Microsoft-Konten im Startmenü im Startmenü an (Standardeinstellung)." + } + } + }, { "Region": "UI & Personalization", "Function": "ThisPC", @@ -1385,7 +1399,7 @@ "Two": { "Tag": "Extension", "ToolTip": "Erweiterung." - } + }, "Three": { "Tag": "Icon", "ToolTip": "Pfad zum Symbol." diff --git a/Wrapper/Localizations/de-DE/tooltip_Windows_11.json b/Wrapper/Localizations/de-DE/tooltip_Windows_11.json index 5161b86c..d4dcb84e 100644 --- a/Wrapper/Localizations/de-DE/tooltip_Windows_11.json +++ b/Wrapper/Localizations/de-DE/tooltip_Windows_11.json @@ -245,15 +245,29 @@ }, { "Region": "Privacy & Telemetry", - "Function": "BrowsingHistory", + "Function": "StartRecommendationsTips", "Arg": { "Zero": { "Tag": "Hide", - "ToolTip": "Zeigt keine Websites aus dem Browserverlauf im Startmenü an." + "ToolTip": "Im Startmenü werden keine Empfehlungen für Tipps, Verknüpfungen, neue Apps und mehr angezeigt." }, "One": { "Tag": "Show", - "ToolTip": "Zeigt Websites aus dem Browserverlauf im Startmenü an (Standardeinstellung)." + "ToolTip": "Empfehlungen für Tipps, Verknüpfungen, neue Apps und mehr im Startmenü anzeigen (Standardeinstellung)." + } + } + }, + { + "Region": "Privacy & Telemetry", + "Function": "StartAccountNotifications", + "Arg": { + "Zero": { + "Tag": "Hide", + "ToolTip": "Microsoft-Kontobezogene Benachrichtigungen werden im Startmenü nicht angezeigt." + }, + "One": { + "Tag": "Show", + "ToolTip": "Microsoft-Kontobezogene Benachrichtigungen im Startmenü im Startmenü anzeigen (Standardeinstellung)." } } }, diff --git a/Wrapper/Localizations/en-US/tooltip_Windows_10.json b/Wrapper/Localizations/en-US/tooltip_Windows_10.json index 7dc3e240..024118ff 100644 --- a/Wrapper/Localizations/en-US/tooltip_Windows_10.json +++ b/Wrapper/Localizations/en-US/tooltip_Windows_10.json @@ -243,6 +243,20 @@ } } }, + { + "Region": "Privacy & Telemetry", + "Function": "StartRecommendationsTips", + "Arg": { + "Zero": { + "Tag": "Hide", + "ToolTip": "Do not show Microsoft account-related notifications on Start Menu in the Start menu." + }, + "One": { + "Tag": "Show", + "ToolTip": "Show Microsoft account-related notifications on Start Menu in the Start menu (default value)." + } + } + }, { "Region": "UI & Personalization", "Function": "ThisPC", @@ -1378,7 +1392,7 @@ "Tag": "", "ToolTip": "Register app, calculate hash, and associate with an extension with the 'How do you want to open this' pop-up hidden." }, - "One": { + "One": { "Tag": "ProgramPath", "ToolTip": "Path to executable file." }, diff --git a/Wrapper/Localizations/en-US/tooltip_Windows_11.json b/Wrapper/Localizations/en-US/tooltip_Windows_11.json index 949417d6..6a985255 100644 --- a/Wrapper/Localizations/en-US/tooltip_Windows_11.json +++ b/Wrapper/Localizations/en-US/tooltip_Windows_11.json @@ -245,15 +245,29 @@ }, { "Region": "Privacy & Telemetry", - "Function": "BrowsingHistory", + "Function": "StartRecommendationsTips", "Arg": { "Zero": { "Tag": "Hide", - "ToolTip": "Do not show websites from your browsing history in the Start menu." + "ToolTip": "Do not show recommendations for tips, shortcuts, new apps, and more in the Start menu." }, "One": { "Tag": "Show", - "ToolTip": "Show websites from your browsing history in the Start menu (default value)." + "ToolTip": "Show recommendations for tips, shortcuts, new apps, and more in the Start menu (default value)." + } + } + }, + { + "Region": "Privacy & Telemetry", + "Function": "StartAccountNotifications", + "Arg": { + "Zero": { + "Tag": "Hide", + "ToolTip": "Do not show Microsoft account-related notifications on Start Menu in the Start menu." + }, + "One": { + "Tag": "Show", + "ToolTip": "Show Microsoft account-related notifications on Start Menu in the Start menu (default value)." } } }, diff --git a/Wrapper/Localizations/ru-RU/tooltip_Windows_10.json b/Wrapper/Localizations/ru-RU/tooltip_Windows_10.json index 44a4739a..a1508cca 100644 --- a/Wrapper/Localizations/ru-RU/tooltip_Windows_10.json +++ b/Wrapper/Localizations/ru-RU/tooltip_Windows_10.json @@ -243,6 +243,20 @@ } } }, + { + "Region": "Privacy & Telemetry", + "Function": "StartRecommendationsTips", + "Arg": { + "Zero": { + "Tag": "Hide", + "ToolTip": "Не показать рекомендации с советами, сочетаниями клавиш, новыми приложениями и т. д. в меню \"Пуск\"." + }, + "One": { + "Tag": "Show", + "ToolTip": "Показать рекомендации с советами, сочетаниями клавиш, новыми приложениями и т. д. в меню \"Пуск\" (значение по умолчанию)." + } + } + }, { "Region": "UI & Personalization", "Function": "ThisPC", @@ -1378,11 +1392,11 @@ "Tag": "", "ToolTip": "Зарегистрируйте приложение, рассчитайте хэш и свяжите его с расширением со скрытым всплывающим окном 'Как вы хотите открыть это'." }, - "One": { + "One": { "Tag": "ProgramPath", "ToolTip": "Путь до исполняемого файла." }, - "Two": { + "Two": { "Tag": "Extension", "ToolTip": "Расширение." }, diff --git a/Wrapper/Localizations/ru-RU/tooltip_Windows_11.json b/Wrapper/Localizations/ru-RU/tooltip_Windows_11.json index 4c7ed6ba..5b0eb5e7 100644 --- a/Wrapper/Localizations/ru-RU/tooltip_Windows_11.json +++ b/Wrapper/Localizations/ru-RU/tooltip_Windows_11.json @@ -245,15 +245,29 @@ }, { "Region": "Privacy & Telemetry", - "Function": "BrowsingHistory", + "Function": "StartRecommendationsTips", "Arg": { "Zero": { "Tag": "Hide", - "ToolTip": "Не показать веб-сайты из журнала браузера в меню \"Пуск\"." + "ToolTip": "Не показать рекомендации с советами, сочетаниями клавиш, новыми приложениями и т. д. в меню \"Пуск\"." }, "One": { "Tag": "Show", - "ToolTip": "Показать веб-сайты из журнала браузера в меню \"Пуск\" (значение по умолчанию)." + "ToolTip": "Показать рекомендации с советами, сочетаниями клавиш, новыми приложениями и т. д. в меню \"Пуск\" (значение по умолчанию)." + } + } + }, + { + "Region": "Privacy & Telemetry", + "Function": "StartAccountNotifications", + "Arg": { + "Zero": { + "Tag": "Hide", + "ToolTip": "Не показывать в меню \"Пуск\" уведомления, связанные с учетной записью Microsoft." + }, + "One": { + "Tag": "Show", + "ToolTip": "Переодически показывать в меню \"Пуск\" уведомления, связанные с учетной записью Microsoft (значение по умолчанию)." } } }, diff --git a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 index eaf33256..d9b4e7dd 100644 --- a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 @@ -240,6 +240,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); winutil = "$env:TEMP\Winutil.log" # https://www.youtube.com/watch?v=5NBqbUUB1Pk WinClean = "$env:ProgramFiles\WinClean Plus Apps" + # https://github.com/Atlas-OS/Atlas + AtlasOS = "$env:SystemRoot\AtlasModules" } foreach ($Tweaker in $Tweakers.Keys) { @@ -2238,6 +2240,57 @@ function BingSearch } } } + +<# + .SYNOPSIS + Microsoft account-related notifications on Start Menu + + .PARAMETER Hide + Do not show Microsoft account-related notifications on Start Menu in the Start menu + + .PARAMETER Show + Show Microsoft account-related notifications on Start Menu in the Start menu + + .EXAMPLE + StartAccountNotifications -Hide + + .EXAMPLE + StartAccountNotifications -Show + + .NOTES + Current user +#> +function StartAccountNotifications +{ + param + ( + [Parameter( + Mandatory = $true, + ParameterSetName = "Hide" + )] + [switch] + $Hide, + + [Parameter( + Mandatory = $true, + ParameterSetName = "Show" + )] + [switch] + $Show + ) + + switch ($PSCmdlet.ParameterSetName) + { + "Hide" + { + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Start_AccountNotifications -PropertyType DWord -Value 0 -Force + } + "Show" + { + Remove-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Start_AccountNotifications -Force -ErrorAction Ignore + } + } +} #endregion Privacy & Telemetry #region UI & Personalization diff --git a/src/Sophia_Script_for_Windows_10/Sophia.ps1 b/src/Sophia_Script_for_Windows_10/Sophia.ps1 index 88de9490..4ca44a87 100644 --- a/src/Sophia_Script_for_Windows_10/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_10/Sophia.ps1 @@ -256,6 +256,14 @@ BingSearch -Disable # Enable Bing search in the Start Menu (default value) # Включить поиск через Bing в меню "Пуск" (значение по умолчанию) # BingSearch -Enable + +# Do not show Microsoft account-related notifications on Start Menu in the Start menu +# Не показывать в меню "Пуск" уведомления, связанные с учетной записью Microsoft +StartAccountNotifications -Hide + +# Show Microsoft account-related notifications on Start Menu in the Start menu (default value) +# Переодически показывать в меню "Пуск" уведомления, связанные с учетной записью Microsoft (значение по умолчанию) +# StartAccountNotifications -Show #endregion Privacy & Telemetry #region UI & Personalization diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 index c0189983..3634fcf3 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 @@ -236,6 +236,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); winutil = "$env:TEMP\Winutil.log" # https://www.youtube.com/watch?v=5NBqbUUB1Pk WinClean = "$env:ProgramFiles\WinClean Plus Apps" + # https://github.com/Atlas-OS/Atlas + AtlasOS = "$env:SystemRoot\AtlasModules" } foreach ($Tweaker in $Tweakers.Keys) { @@ -2244,6 +2246,57 @@ function BingSearch } } } + +<# + .SYNOPSIS + Microsoft account-related notifications on Start Menu + + .PARAMETER Hide + Do not show Microsoft account-related notifications on Start Menu in the Start menu + + .PARAMETER Show + Show Microsoft account-related notifications on Start Menu in the Start menu + + .EXAMPLE + StartAccountNotifications -Hide + + .EXAMPLE + StartAccountNotifications -Show + + .NOTES + Current user +#> +function StartAccountNotifications +{ + param + ( + [Parameter( + Mandatory = $true, + ParameterSetName = "Hide" + )] + [switch] + $Hide, + + [Parameter( + Mandatory = $true, + ParameterSetName = "Show" + )] + [switch] + $Show + ) + + switch ($PSCmdlet.ParameterSetName) + { + "Hide" + { + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Start_AccountNotifications -PropertyType DWord -Value 0 -Force + } + "Show" + { + Remove-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Start_AccountNotifications -Force -ErrorAction Ignore + } + } +} #endregion Privacy & Telemetry #region UI & Personalization diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1 index 7b0deff3..24cd53a6 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1 @@ -72,6 +72,8 @@ Clear-Host $Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.18.5 (PowerShell 7) | Made with $([System.Char]::ConvertFromUtf32(0x1F497)) of Windows | $([System.Char]0x00A9) farag, Inestic & lowl1f3, 2014$([System.Char]0x2013)2024" +Remove-Module -Name Sophia -Force -ErrorAction Ignore + # PowerShell 7 doesn't load en-us localization automatically if there is no localization folder in user's language which is determined by $PSUICulture # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/import-localizeddata?view=powershell-7.3 # https://github.com/PowerShell/PowerShell/pull/19896 @@ -265,6 +267,14 @@ BingSearch -Disable # Enable Bing search in the Start Menu (default value) # Включить поиск через Bing в меню "Пуск" (значение по умолчанию) # BingSearch -Enable + +# Do not show Microsoft account-related notifications on Start Menu in the Start menu +# Не показывать в меню "Пуск" уведомления, связанные с учетной записью Microsoft +StartAccountNotifications -Hide + +# Show Microsoft account-related notifications on Start Menu in the Start menu (default value) +# Переодически показывать в меню "Пуск" уведомления, связанные с учетной записью Microsoft (значение по умолчанию) +# StartAccountNotifications -Show #endregion Privacy & Telemetry #region UI & Personalization diff --git a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 index 830abc4d..ab300e33 100644 --- a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 @@ -228,6 +228,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); winutil = "$env:TEMP\Winutil.log" # https://www.youtube.com/watch?v=5NBqbUUB1Pk WinClean = "$env:ProgramFiles\WinClean Plus Apps" + # https://github.com/Atlas-OS/Atlas + AtlasOS = "$env:SystemRoot\AtlasModules" } foreach ($Tweaker in $Tweakers.Keys) { @@ -2223,27 +2225,24 @@ function BingSearch <# .SYNOPSIS - Browsing history in the Start menu + Recommendations for tips, shortcuts, new apps, and more in the Start menu .PARAMETER Hide - Do not show websites from your browsing history in the Start menu + Do not show recommendations for tips, shortcuts, new apps, and more in the Start menu .PARAMETER Show - Show websites from your browsing history in the Start menu + Show recommendations for tips, shortcuts, new apps, and more in the Start menu .EXAMPLE - BrowsingHistory -Hide + StartRecommendationsTips -Hide .EXAMPLE - BrowsingHistory -Show - - .NOTES - Windows 11 build 23451 (Dev) required + StartRecommendationsTips -Show .NOTES Current user #> -function BrowsingHistory +function StartRecommendationsTips { param ( @@ -2262,23 +2261,66 @@ function BrowsingHistory $Show ) - if ((Get-CimInstance -ClassName CIM_OperatingSystem).BuildNumber -lt 23451) + switch ($PSCmdlet.ParameterSetName) { - Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message $Localization.Skipped -Verbose - - return + "Hide" + { + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Start_IrisRecommendations -PropertyType DWord -Value 0 -Force + } + "Show" + { + Remove-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Start_IrisRecommendations -Force -ErrorAction Ignore + } } +} + +<# + .SYNOPSIS + Microsoft account-related notifications on Start Menu + + .PARAMETER Hide + Do not show Microsoft account-related notifications on Start Menu in the Start menu + + .PARAMETER Show + Show Microsoft account-related notifications on Start Menu in the Start menu + + .EXAMPLE + StartAccountNotifications -Hide + + .EXAMPLE + StartAccountNotifications -Show + + .NOTES + Current user +#> +function StartAccountNotifications +{ + param + ( + [Parameter( + Mandatory = $true, + ParameterSetName = "Hide" + )] + [switch] + $Hide, + + [Parameter( + Mandatory = $true, + ParameterSetName = "Show" + )] + [switch] + $Show + ) switch ($PSCmdlet.ParameterSetName) { "Hide" { - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Start_RecoPersonalizedSites -PropertyType DWord -Value 0 -Force + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Start_AccountNotifications -PropertyType DWord -Value 0 -Force } "Show" { - Remove-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Start_RecoPersonalizedSites -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Start_AccountNotifications -Force -ErrorAction Ignore } } } diff --git a/src/Sophia_Script_for_Windows_11/Sophia.ps1 b/src/Sophia_Script_for_Windows_11/Sophia.ps1 index b956aa45..dae99141 100644 --- a/src/Sophia_Script_for_Windows_11/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_11/Sophia.ps1 @@ -256,13 +256,21 @@ BingSearch -Disable # Включить поиск через Bing в меню "Пуск" (значение по умолчанию) # BingSearch -Enable -# Do not show websites from your browsing history in the Start menu. Windows 11 build 23451 (Dev) required -# Не показать веб-сайты из журнала браузера в меню "Пуск". Требуется Windows 11 build 23451 (Dev) -BrowsingHistory -Hide +# Do not show recommendations for tips, shortcuts, new apps, and more in the Start menu +# Не показать рекомендации с советами, сочетаниями клавиш, новыми приложениями и т. д. в меню "Пуск" +StartRecommendationsTips -Hide -# Show websites from your browsing history in the Start menu (default value) -# Показать веб-сайты из журнала браузера в меню "Пуск" (значение по умолчанию) -# BrowsingHistory -Show +# Show recommendations for tips, shortcuts, new apps, and more in the Start menu (default value) +# Показать рекомендации с советами, сочетаниями клавиш, новыми приложениями и т. д. в меню "Пуск" (значение по умолчанию) +# StartRecommendationsTips -Show + +# Do not show Microsoft account-related notifications on Start Menu in the Start menu +# Не показывать в меню "Пуск" уведомления, связанные с учетной записью Microsoft +StartAccountNotifications -Hide + +# Show Microsoft account-related notifications on Start Menu in the Start menu (default value) +# Переодически показывать в меню "Пуск" уведомления, связанные с учетной записью Microsoft (значение по умолчанию) +# StartAccountNotifications -Show #endregion Privacy & Telemetry #region UI & Personalization diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 index 75f34ee9..22c12320 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 @@ -224,6 +224,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); winutil = "$env:TEMP\Winutil.log" # https://www.youtube.com/watch?v=5NBqbUUB1Pk WinClean = "$env:ProgramFiles\WinClean Plus Apps" + # https://github.com/Atlas-OS/Atlas + AtlasOS = "$env:SystemRoot\AtlasModules" } foreach ($Tweaker in $Tweakers.Keys) { @@ -2226,27 +2228,24 @@ function BingSearch <# .SYNOPSIS - Browsing history in the Start menu + Recommendations for tips, shortcuts, new apps, and more in the Start menu .PARAMETER Hide - Do not show websites from your browsing history in the Start menu + Do not show recommendations for tips, shortcuts, new apps, and more in the Start menu .PARAMETER Show - Show websites from your browsing history in the Start menu + Show recommendations for tips, shortcuts, new apps, and more in the Start menu .EXAMPLE - BrowsingHistory -Hide + StartRecommendationsTips -Hide .EXAMPLE - BrowsingHistory -Show - - .NOTES - Windows 11 build 23451 (Dev) required + StartRecommendationsTips -Show .NOTES Current user #> -function BrowsingHistory +function StartRecommendationsTips { param ( @@ -2265,23 +2264,66 @@ function BrowsingHistory $Show ) - if ((Get-CimInstance -ClassName CIM_OperatingSystem).BuildNumber -lt 23451) + switch ($PSCmdlet.ParameterSetName) { - Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message $Localization.Skipped -Verbose - - return + "Hide" + { + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Start_IrisRecommendations -PropertyType DWord -Value 0 -Force + } + "Show" + { + Remove-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Start_IrisRecommendations -Force -ErrorAction Ignore + } } +} + +<# + .SYNOPSIS + Microsoft account-related notifications on Start Menu + + .PARAMETER Hide + Do not show Microsoft account-related notifications on Start Menu in the Start menu + + .PARAMETER Show + Show Microsoft account-related notifications on Start Menu in the Start menu + + .EXAMPLE + StartAccountNotifications -Hide + + .EXAMPLE + StartAccountNotifications -Show + + .NOTES + Current user +#> +function StartAccountNotifications +{ + param + ( + [Parameter( + Mandatory = $true, + ParameterSetName = "Hide" + )] + [switch] + $Hide, + + [Parameter( + Mandatory = $true, + ParameterSetName = "Show" + )] + [switch] + $Show + ) switch ($PSCmdlet.ParameterSetName) { "Hide" { - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Start_RecoPersonalizedSites -PropertyType DWord -Value 0 -Force + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Start_AccountNotifications -PropertyType DWord -Value 0 -Force } "Show" { - Remove-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Start_RecoPersonalizedSites -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Start_AccountNotifications -Force -ErrorAction Ignore } } } @@ -13030,6 +13072,60 @@ function PUAppsDetection } } +<# + .SYNOPSIS + Sandboxing for Microsoft Defender + + .PARAMETER Enable + Enable sandboxing for Microsoft Defender + + .PARAMETER Disable + Disable sandboxing for Microsoft Defender + + .EXAMPLE + DefenderSandbox -Enable + + .EXAMPLE + DefenderSandbox -Disable + + .NOTES + Machine-wide +#> +function DefenderSandbox +{ + param + ( + [Parameter( + Mandatory = $true, + ParameterSetName = "Enable" + )] + [switch] + $Enable, + + [Parameter( + Mandatory = $true, + ParameterSetName = "Disable" + )] + [switch] + $Disable + ) + + if ($Script:DefenderEnabled) + { + switch ($PSCmdlet.ParameterSetName) + { + "Enable" + { + setx /M MP_FORCE_USE_SANDBOX 1 + } + "Disable" + { + setx /M MP_FORCE_USE_SANDBOX 0 + } + } + } +} + # Dismiss Microsoft Defender offer in the Windows Security about signing in Microsoft account function DismissMSAccount { @@ -13574,7 +13670,7 @@ function WindowsSandbox $Enable ) - if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Professional") -or ($_.Edition -eq "Enterprise")})) + if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Professional") -or ($_.Edition -eq "Enterprise") -or ($_.Edition -eq "Education")})) { return } diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1 index ffd91b06..a76cd772 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1 @@ -267,13 +267,21 @@ BingSearch -Disable # Включить поиск через Bing в меню "Пуск" (значение по умолчанию) # BingSearch -Enable -# Do not show websites from your browsing history in the Start menu. Windows 11 build 23451 (Dev) required -# Не показать веб-сайты из журнала браузера в меню "Пуск". Требуется Windows 11 build 23451 (Dev) -BrowsingHistory -Hide +# Do not show recommendations for tips, shortcuts, new apps, and more in the Start menu +# Не показать рекомендации с советами, сочетаниями клавиш, новыми приложениями и т. д. в меню "Пуск" +StartRecommendationsTips -Hide -# Show websites from your browsing history in the Start menu (default value) -# Показать веб-сайты из журнала браузера в меню "Пуск" (значение по умолчанию) -# BrowsingHistory -Show +# Show recommendations for tips, shortcuts, new apps, and more in the Start menu (default value) +# Показать рекомендации с советами, сочетаниями клавиш, новыми приложениями и т. д. в меню "Пуск" (значение по умолчанию) +# StartRecommendationsTips -Show + +# Do not show Microsoft account-related notifications on Start Menu in the Start menu +# Не показывать в меню "Пуск" уведомления, связанные с учетной записью Microsoft +StartAccountNotifications -Hide + +# Show Microsoft account-related notifications on Start Menu in the Start menu (default value) +# Переодически показывать в меню "Пуск" уведомления, связанные с учетной записью Microsoft (значение по умолчанию) +# StartAccountNotifications -Show #endregion Privacy & Telemetry #region UI & Personalization