windows - 需要帮助通过 powershell 删除默认的 Windows 10 应用程序

标签 windows powershell windows-store-apps

我正在尝试通过在 powershell 脚本中运行以下命令来消除 Windows 10 Education 的膨胀。我可以获取脚本来删除已登录用户的应用程序,但只要有新用户登录,这些应用程序就会重新出现。

这是我的脚本:

Get-AppxPackage -AllUsers | where-object {$_.name –like “*3DBuilder*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*windowsalarms*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*windowscamera*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*windowscommunicationsapps*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*officehub*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*getstarted*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*windowsmap*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*solitairecollection*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*bingfinance*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*bingnews*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*zunevideo*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*people*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*windowsphone*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*bingsports*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*windowsstore*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*soundrecorder*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*bingweather*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*xboxapp*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*Appconnector*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*MinecraftUWP*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*Messaging*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*WindowsFeedbackHub*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*Getstarted*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*GetHelp*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*ContactSupport*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*Wallet*”} | Remove-AppxPackage
Get-AppxPackage -AllUsers | where-object {$_.name –like “*OneConnect*”} | Remove-AppxPackage

如有任何建议,我们将不胜感激。

最佳答案

我不是 100% 确定,但我认为你需要使用 -Online 参数

$Apps = Get-AppxProvisionedPackage -Online
$Apps | Where-Object {$_.DisplayName -like "*windowscommun*"} | Remove-AppxProvisionedPackage -Online

关于windows - 需要帮助通过 powershell 删除默认的 Windows 10 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45689434/

相关文章:

xaml - ScrollViewer 中是否可以有非滚动行?

Android/Windows 混合应用

c++ - MinGW,链接到 Windows 上的 dll

windows - Windows 中的内存是如何组织的?

powershell - 将密码硬编码到 powershell "New-PSSession"

c# - VirtualKey C# Windows 应用商店应用程序

javascript - 如何获取 Windows 8 应用程序的 dpix 和 dpiy 值(Javascript)

css - Webfonts 在 OS X 和 Windows 之间不匹配

powershell - 变量赋值中括号前的逗号

powershell - Powershell 中 getElementById 和 getElementsByName 之间的差异