Skip to content

Commit

Permalink
Fix unpinning apps
Browse files Browse the repository at this point in the history
  • Loading branch information
YummyBacon5 authored Nov 21, 2024
1 parent 26cd929 commit f940b55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function Remove-TaskbarPin { param(
[string]$appname
)
try {
((New-Object -Com Shell.Application).NameSpace("shell:::{4234d49b-0245-4df3-b780-3893943456e1}").Items() | Where-Object {$_.Name -eq $appname}).Verbs() | Where-Object {$_.Name.replace("&", "") -match "Unpin from taskbar"} | ForEach-Object {$_.DoIt()}
((New-Object -Com Shell.Application).NameSpace("shell:::{4234d49b-0245-4df3-b780-3893943456e1}").Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace("&", "") -match "Unpin from taskbar"} | %{$_.DoIt()}
return "App '$appname' unpinned from Taskbar"
} catch {
Write-Error "Error Unpinning App! (Is '$appname' correct?)"
Expand Down

0 comments on commit f940b55

Please sign in to comment.