Adding GUI to Server 2012 Core

Trying to add GUI to 2012 Core via Powershell command

install-windowsfeature server-gui-mgmt-infra, server-gui-shell-restart

but get

install-windowsfeature : ArgumentNotValid: The role, role service, or feature
name is not valid: 'server-gui-mgmt-infra,server-gui-shell-restart'. The name
was not found.
At line:1 char:1
+ install-windowsfeature server-gui-mgmt-infra, server-gui-shell-restart
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (server-gui-mgmt...i-shell-rest
   art:String) [Install-WindowsFeature], Exception
    + FullyQualifiedErrorId : NameDoesNotExist,Microsoft.Windows.ServerManager

Success Restart Needed Exit Code      Feature Result
------- -------------- ---------      --------------
False   No             InvalidArgs    {}

Any ideas Please ? Running Server 2012 with 4 VM's
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Luis MouraCommented:
Try this:

1. Import-Module Dism
2. Enable-WindowsOptionalFeature –online -Featurename ServerCore-FullServer,Server-Gui-Shell,Server-Gui-Mgmt
By the way, you can also try the following command line:
Dism /online /enable-feature /featurename:ServerCore-FullServer /featurename:Server-Gui-Shell /featurename:Server-Gui-Mgmt
matmosAuthor Commented:
Thank you for the quick response. The first command returns the following -

Enable-WindowsOptionalFeature : Feature name ServerCore-FullServer is unknown.
At line:1 char:1
+ Enable-WindowsOptionalFeature -online -Featurename
ServerCore-FullServer,Server- ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature
   ], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFea

and second gives -

PS C:\> Dism /online /enable-feature /featurename:ServerCore-FullServer /feature
name:Server-Gui-Shell /featurename:Server-Gui-Mgmt

Deployment Image Servicing and Management tool
Version: 6.3.9600.17031

Image Version: 6.3.9600.17031

Error: 0x800f080c

Feature name ServerCore-FullServer is unknown.
Feature name Server-Gui-Shell is unknown.
Feature name Server-Gui-Mgmt is unknown.
A Windows feature name was not recognized.
Use the /Get-Features option to find the name of the feature in the image and tr
y the command again.

The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
Cliff GaliherCommented:
Was this 2012 Standard? Datacenter?  You aren't trying to install the GUI on the free Hyper-V Server product, are you?
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

Luis MouraCommented:
Its the same result but try it:
Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell
Luis MouraCommented:
Check this from other blog maybe can be help.

Server features can be installed from the web via Windows Update. If you want to install from a local source, you can mount the install.wim file using Dism /Mount-Wim. When mounting the wim, make sure you mount an image index that contains the feature you want to install (e.g. Server with GUI). Then point Dism or Install-WindowsFeature to the mount directory (e.g. c:\mount) as the source.

The sxs directory on the media only contains files that are not already in the wim; that way you aren't downloading redundant data. Thus, if you wanted to install some feature like NetFx3 (.NET Framework 3.5), that feature is not included in any edition and is therefore not in the wim at all; you'd have to point to the sxs directory in this case.

If you wanted to create a centralized network install point that you could point to, you could extract the wim and then merge the contents of the sxs directory on the media with the winsxs directory in <mount>/windows/winsxs to have a single source that could install all features. Hope this makes sense! Let me know if you have any more questions or feedback about Features on Demand.

For more information, there is also documentation available at
matmosAuthor Commented:
Thank you Cliff, I didn't install this - have just been brought in to try and set up this box up to replicate a 2012 Standard server, so thought the first thing I would do is install GUI as not familiar with PowerShell.

Is there a way to check from Powershell / Command Prompt that this is Server 2012 Standard install ?
Cliff GaliherCommented:
The command you seek is "winver" (without the quotes)
matmosAuthor Commented:
Had tried that but winver not recognized command (in command prompt or powershell)
Cliff GaliherCommented:
winver isn't present in Hyper-V Server (but is included in a core install of standard or datacenter) so that's a *pretty* good indication that you aren't running core, but are running Hyper-V (free).

But if you really want to double check, "systeminfo" should report everything you need and *does* work in Hyper-V Server.
It spits back a ton of info though, including hardware and hotfix info. So piping it to "more" is a good idea.  systeminfo | more

And the first few lines will include the OS name and version.
matmosAuthor Commented:
Thank you - is this the free version - In which case I guess it cant be used to replicate a 2012R2 Standard Server ?

OS Name:                   Microsoft Hyper-V Server 2012 R2
OS Version:                6.3.9600 N/A Build 9600
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Member Server
OS Build Type:             Multiprocessor Free
Registered Owner:          Windows User
Registered Organization:
Product ID:                06401-029-0000043-76293
Original Install Date:     13/08/2015, 15:49:24
System Boot Time:          12/10/2015, 13:02:53
System Manufacturer:       Intel Corporation
System Model:              S2600CP
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 45 Stepping 7 GenuineInt
el ~2494 Mhz
BIOS Version:              Intel Corp. SE5C600.86B.02.05.0004.051120151007, 11/0
Cliff GaliherCommented:
The free server can be used in a Hyper-V Replica (if that's what you mean by replicate), but the host cannot have a GUI or run other non-HyperV roles. It is free for a reason.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2012

From novice to tech pro — start learning today.