删除和卸载 Windows 功能之间的区别

Difference Between Remove and Uninstall WindowsFeature

我是 运行 Windows Server 2016,并通过 Powershell 命令添加了一个 Windows 功能:

Add-WindowsFeature NET-WCF-MSMQ-Activation45

如果我要 remove/uninstall 它,我应该使用哪个?

Remove-WindowsFeature NET-WCF-MSMQ-Activation45

Uninstall-WindowsFeature NET-WCF-MSMQ-Activation45

另外,修改后需要重启服务器吗?

谢谢。

如有疑问,请阅读 documentation:

Uninstall-WindowsFeature

Uninstalls specified Windows Server roles, role services, and features from a computer that is running Windows Server 2012 R2. By adding the Remove parameter, also deletes feature files, or payload, from a computer. This cmdlet replaces Remove-WindowsFeature, the cmdlet that was used to uninstall roles, role services, and features in Windows Server 2008 R2.