问题
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