加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

从Windows 8批量删除Features On Demand有效负载?

发布时间:2020-12-13 23:26:53 所属栏目:Windows 来源:网络整理
导读:如果我想修剪的每个功能都没有运行dism / online / disable-feature / remove / featurename:featurename,是否有办法删除所有禁用功能的磁盘上的负载? Windows 8中的Powershell 3.0提供了一个名为 Get-WindowsOptionalFeature的新cmdlet,可用于查询功能及
如果我想修剪的每个功能都没有运行dism / online / disable-feature / remove / featurename:featurename,是否有办法删除所有禁用功能的磁盘上的负载?
Windows 8中的Powershell 3.0提供了一个名为 Get-WindowsOptionalFeature的新cmdlet,可用于查询功能及其当前状态.通过一点过滤,您可以沿着链传递它并为每个功能执行dism.
Get-WindowsOptionalFeature -Online | where { $_.State -match "Disabled" } | `
    foreach { `
        $_ = $_.FeatureName; `
        DISM /Online /Disable-Feature /FeatureName:$_ /Remove `
    }

其他链接

> Enable or Disable Windows Features Using DISM
> Use PowerShell to Find Disabled Features in Windows 8
> Manage Windows Features from Command Line with DISM

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读