Created
September 29, 2023 04:31
-
-
Save takumaw/8af6a832d8cce82201a74b3fa14a929d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function unpin_taskbar([string]$appname) { | |
((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | Where-Object {$_.Name -eq $appname}).Verbs() | Where-Object {$_.Name.replace('&','') -match 'タスク バーからピン留めを外す'} | ForEach-Object {$_.DoIt()} | |
} | |
foreach ($taskbarapp in ("PowerPoint", "Excel")) { | |
Write-Host "Unpinning $taskbarapp" | |
unpin_taskbar("$taskbarapp") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment