Allow removing task bar icons
This commit is contained in:
parent
a8929f0707
commit
cb3edcfa55
2 changed files with 17 additions and 0 deletions
|
@ -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 $_ };
|
||||
}
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue