使用PowerShell的Windows 10构建20H2中的任务栏中的Unident Internet Explorer

发布于 2025-01-26 12:36:49 字数 782 浏览 2 评论 0原文

有没有人从赢得10 B20H2 / 21H2的任务栏中找到了从任务栏中找到Internet Explorer(和其他应用程序)的工作解决方案?

我尝试了Google Top搜索中的大量解决方案,但似乎没有一个与Win10 B20H2一起使用。

布局XML的导出和导入不是一个选项。

来自 https://learn.microsoft.com/en-us/aswers/questions/214599/214599/unpin-icons-from-taskbar-taskbar-in-windows-10-20h2.html

他们建议这个脚本,但是对我来说,但是它不起作用 - 它执行并返回没有错误,但不会取消捷径:

$appname = "Microsoft Store"
((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$.Name -eq $appname}).Verbs() | ?{$.Name.replace('&','') -match 'Unpin from taskbar'} | %{$_.DoIt(); $exec = $true}

Has anyone found a working solution to unpin Internet Explorer (and other apps) from the Taskbar in Win 10 B20H2 / 21H2?

I tryed ALOT of the solutions in google top searches, but none seems to work with Win10 B20H2.

Export and import of the layout xml is not an option.

From https://learn.microsoft.com/en-us/answers/questions/214599/unpin-icons-from-taskbar-in-windows-10-20h2.html

They suggest this script, but for me it doesn't work - it executes and returns no errors, but doesn't unpin the shortcut:

$appname = "Microsoft Store"
((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$.Name -eq $appname}).Verbs() | ?{$.Name.replace('&','') -match 'Unpin from taskbar'} | %{$_.DoIt(); $exec = $true}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

爱情眠于流年 2025-02-02 12:36:49

您发布的示例有一些错别字。
您可以尝试以下操作:

  1. 执行以下命令,并找到要脱键的应用程序的名称,
  (New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | 
  Sort-Object Name | Select-Object Name
  1. 如果您具有英语以外的显示语言,请执行以下命令以从taskbar 动词
((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | 
Select-Object -First 1 ).Verbs() | Select-Object Name
  1. 创建 unpin带有您要删除的应用程序的数组
    • 如果您执行了步骤2,请用您找到的动词替换$ action变量(没有任何符号,例如&)。

$appnames = @("App1", "App2", "App3")
$Action = "Unpin from taskbar"
((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | 
  Where-Object { $appnames -contains $_.Name }).Verbs() | 
  Where-Object {$_.Name.replace('&','') -match $Action} | 
  ForEach-Object {$_.DoIt()}

The example you posted have some typos.
You can try the following:

  1. Execute the following command and find the name of the applications you want to unpin
  (New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | 
  Sort-Object Name | Select-Object Name
  1. If you have a display language other than English, do the following command to find your Unpin from taskbar verb
((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | 
Select-Object -First 1 ).Verbs() | Select-Object Name
  1. Create an array with the apps you want to remove, and unpin it
    • If you did step 2, replace the $Action variable with the verb you found (without any symbols like &).

$appnames = @("App1", "App2", "App3")
$Action = "Unpin from taskbar"
((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | 
  Where-Object { $appnames -contains $_.Name }).Verbs() | 
  Where-Object {$_.Name.replace('&','') -match $Action} | 
  ForEach-Object {$_.DoIt()}
九八野马 2025-02-02 12:36:49

感谢您的脚本。我们花了一段时间才知道它仅适用于英语Windows语言版本。

您必须将“ Unpin从Taskbar”转换为Windows语言版本。

对于波兰Windows Edition,uncin Internet Explorer的适当脚本如下:

$appnames = @("Internet Explorer")
((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | 
 Where-Object { $appnames -contains $_.Name }).Verbs() |
 Where-Object {$_.Name.replace('&','') -match 'Odepnij od paska'} |   ForEach-Object {$_.DoIt()}

Thanks for the script. It took us a while before we figure out that it work only for English Windows language version.

You have to translate "Unpin from taskbar" to your Windows language version.

For a Polish Windows edition, the proper script to unpin Internet Explorer is as follows:

$appnames = @("Internet Explorer")
((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | 
 Where-Object { $appnames -contains $_.Name }).Verbs() |
 Where-Object {$_.Name.replace('&','') -match 'Odepnij od paska'} |   ForEach-Object {$_.DoIt()}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文