Enabling desktop experience from C# on windows 2008 / 2012

懵懂的女人 提交于 2019-12-12 04:42:41

问题


I am currently using command:

servermanagercmd -install Desktop-Experience

From what I read, I understood that this is no longer supported in Windows 2012.

I understood that can be done from PowerShell cmdlet somehow but can't find an example for a need.


回答1:


I think the PS script you're looking for is:

Add-WindowsFeature Desktop-Experience



回答2:


I don't think the Add-WindowsFeature command will work back in 2008. DISM is the best route for all versions involved.

Dism /online /Enable-Feature /FeatureName:DesktopExperience /All 


来源:https://stackoverflow.com/questions/21406939/enabling-desktop-experience-from-c-sharp-on-windows-2008-2012

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!