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