dism /online /disable-feature /remove /featurename:featurename运行dism /online /disable-feature /remove /featurename:featurename我想修剪的每个function,是否有删除所有禁用function的磁盘有效载荷的方法?
Windows 8中的Powershell 3.0提供了一个名为Get-WindowsOptionalFeature的新cmdlet,可用于查询要素及其当前状态。 通过一些过滤,你可以通过这个链,并执行dism每个function。
Get-WindowsOptionalFeature -Online | where { $_.State -match "Disabled" } | ` foreach { ` $_ = $_.FeatureName; ` DISM /Online /Disable-Feature /FeatureName:$_ /Remove ` }
其他链接