当前,Windows Server 2012使用超过38GB的磁盘空间。这些是SSD驱动器。有没有办法从磁盘上删除不需要或当前正在使用的所有功能和角色?
如果这样做,我可以把他们找回来吗?
编辑:在下面的帖子,我可以做这样的事情呢?
get-windowsFeature | where-object {$_.installed -eq $false} | uninstall-windowsfeature -remove
您可以使用dism.exe从现代Windows中删除功能。在2012年,您可以使用PowerShell dism cmdlet:
查看功能:
Get-WindowsOptionalFeature –Online
让我们删除一个:
Disable-WindowsOptionalFeature -Online -FeatureName VolumeActivation-Full-Role -Remove
如果没有-Remove开关,则只能禁用某个功能,而使用-Remove可以从磁盘上删除该功能的文件。再次使用Get-WindowsOptionalFeature,它现在显示:
Feature Name : VolumeActivation-Full-Role
State : DisabledWithPayloadRemoved
如果您决定需要该功能,则可以使用另一个cmdlet:
Enable-WindowsOptionalFeature -Online -FeatureName xxxx -Source D:\sources
您需要指定文件的来源,这可以是本地DVD,网络共享或Windows Update服务器。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句