Added option to disable Windows copilot, and some other minor changes

All changes:
* Added option to disable Windows Copilot
* Condensed options in custom mode
* Added new outlook app to appslist, it's not removed by default
* Added some missing info to README.md
This commit is contained in:
Raphire
2023-09-27 02:45:34 +02:00
parent b62b36263a
commit 14246951fa
5 changed files with 50 additions and 15 deletions

View File

@@ -21,6 +21,7 @@ param
[Parameter(ValueFromPipeline = $true)][switch]$ShowSearchLabelTb,
[Parameter(ValueFromPipeline = $true)][switch]$ShowSearchBoxTb,
[Parameter(ValueFromPipeline = $true)][switch]$HideTaskview,
[Parameter(ValueFromPipeline = $true)][switch]$DisableCopilot,
[Parameter(ValueFromPipeline = $true)][switch]$DisableWidgets,
[Parameter(ValueFromPipeline = $true)][switch]$HideWidgets,
[Parameter(ValueFromPipeline = $true)][switch]$DisableChat,
@@ -252,18 +253,13 @@ if ((-NOT $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (
Write-Output ""
if ($( Read-Host -Prompt "Disable tips, tricks and suggestions in the start menu, settings and windows explorer? (y/n)" ) -eq 'y') {
if ($( Read-Host -Prompt "Disable tips, tricks, suggestions and ads in start, settings, notifications, windows explorer and on the lockscreen? (y/n)" ) -eq 'y') {
$PSBoundParameters.Add('DisableSuggestions', $DisableSuggestions)
$PSBoundParameters.Add('DisableLockscreenTips', $DisableLockscreenTips)
}
Write-Output ""
if ($( Read-Host -Prompt "Disable tips & tricks on the lockscreen? (y/n)" ) -eq 'y') {
$PSBoundParameters.Add('DisableLockscreenTips', $DisableLockscreenTips)
}
Write-Output ""
# Only show this option for windows 11 users
if (get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 11%'"){
if ($( Read-Host -Prompt "Remove all pinned apps from the start menu? This applies to all existing and new users (y/n)" ) -eq 'y') {
@@ -273,7 +269,7 @@ if ((-NOT $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (
Write-Output ""
if ($( Read-Host -Prompt "Do you want to make any changes to the taskbar? (y/n)" ) -eq 'y') {
if ($( Read-Host -Prompt "Do you want to make any changes to the taskbar and related services? (y/n)" ) -eq 'y') {
# Only show these specific options for windows 11 users
if (get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 11%'"){
Write-Output ""
@@ -316,6 +312,12 @@ if ((-NOT $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (
if ($( Read-Host -Prompt " Hide the taskview button from the taskbar? (y/n)" ) -eq 'y') {
$PSBoundParameters.Add('HideTaskview', $HideTaskview)
}
Write-Output ""
if ($( Read-Host -Prompt " Disable Windows copilot and hide it from the taskbar? (y/n)" ) -eq 'y') {
$PSBoundParameters.Add('DisableCopilot', $DisableCopilot)
}
}
Write-Output ""
@@ -445,7 +447,7 @@ switch ($PSBoundParameters.Keys) {
continue
}
{$_ -in "DisableSuggestions", "DisableWindowsSuggestions"} {
RegImport "> Disabling tips, tricks and suggestions in the start menu, settings and windows explorer..." $PSScriptRoot\Regfiles\Disable_Windows_Suggestions.reg
RegImport "> Disabling tips, tricks, suggestions and ads in start, settings, notifications and windows explorer..." $PSScriptRoot\Regfiles\Disable_Windows_Suggestions.reg
Write-Output ""
continue
}
@@ -479,6 +481,11 @@ switch ($PSBoundParameters.Keys) {
Write-Output ""
continue
}
'DisableCopilot' {
RegImport "> Disabling Windows copilot..." $PSScriptRoot\Regfiles\Disable_Copilot.reg
Write-Output ""
continue
}
{$_ -in "HideWidgets", "DisableWidgets"} {
RegImport "> Disabling the widget service and hiding the widget icon from the taskbar..." $PSScriptRoot\Regfiles\Disable_Widgets_Taskbar.reg
Write-Output ""