diff --git a/scripts/Common/Scripts/System.ps1 b/scripts/Common/Scripts/System.ps1 index fb530358..71805ef5 100644 --- a/scripts/Common/Scripts/System.ps1 +++ b/scripts/Common/Scripts/System.ps1 @@ -29,3 +29,19 @@ function Remove-DesktopIcon { } } } + +<# + .SYNOPSIS + Removes icons from the task bar. + + .PARAMETER Pattern + The pattern of the icon names to remove. +#> +function Remove-TaskbarItem { + param( + [string] $Pattern + ) + + Import-Module -UseWindowsPowerShell PinnedItem; + Get-PinnedItem -Type TaskBar | Where-Object { $_.Name -like "$Pattern" } | ForEach-Object { Remove-PinnedItem $_ }; +} diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index 78deed68..b27d2e0c 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -65,6 +65,7 @@ $null = New-Module { Invoke-Hook "Install-PSModules" -Fallback { Install-Module -AcceptLicense -Force PSWindowsUpdate; Install-Module -AcceptLicense -Force PSScriptAnalyzer; + . "$PSScriptRoot/../../Common/Software/PinnedItem/Manage.ps1"; }; if (-not (Test-Winget)) {