Deploying and Configuring Server Core VMs on Hyper-V (Part 6)

If you would like to read the other parts in this article series please go to


Throughout this article series, I have shown you how to perform a number of different configuration tasks in order to prepare your server for use. Even though your server might now be running a basic configuration that makes it suitable for use on your network, the server still isn’t really doing anything. As it stands right now we are running any applications on the server, nor are we running any Windows Server roles. It’s time to change all that. In this article, I want to talk about some techniques that you can use to deploy server roles onto a core server.

A Word About Applications

As I’m sure you know by now, server core is designed to be a lightweight operating system. As such, there are a lot of applications that simply will not run on server core deployments. This happens because server core lacks many of the internal components that are found in full blown Windows Server 2008 and 2008 R2 deployments. Therefore, if you are thinking about running a particular application on a core server then I would strongly recommend that you check with the application’s publisher to verify that you will be able to do so.


Before I get started, I want to talk about Windows PowerShell. As I’m sure you know, PowerShell is an underlying requirement for many Microsoft applications. Many third-party applications are also beginning to take advantage of PowerShell as well.

It is worth noting that core servers running Windows Server 2008 do not officially support the use of PowerShell. PowerShell requires the .NET Framework, and that isn’t present in the Windows Server 2008 version of Server Core.

There is a workaround that you can use to make PowerShell work on Windows Server 2008 if you absolutely have to, but you must keep in mind that this method is not officially supported by Microsoft. You can find the workaround here.

Windows Server 2008 R2 does natively support PowerShell, the PowerShell is not installed by default. Before you go through the trouble of installing PowerShell, think back to the earlier parts of this article series when I talked about a utility called Core Configurator. If you ran the 2.0 version of Core Configurator ( then PowerShell is already installed on your server. Core Configurator can’t run without PowerShell, so it installs it automatically if PowerShell is not already present.

The easiest way to install PowerShell on a core server running on Windows Server 2008 R2 is to use the SCONFIG utility. Just enter the SCONFIG command at the command prompt and then choose option 4 (Configure Remote Management) followed by option 2 (Enable Windows PowerShell), as shown in Figure A.

Figure A: You can use the SCONFIG utility to enable PowerShell.

Server Roles

As I mentioned at the beginning of this article, core servers run a lightweight operating system and are not capable of running some applications. The same thing can also be said for Windows server roles. There are some server roles which are simply not available in server core deployments. Furthermore, the roles that are actually available to you vary depending upon which edition of Windows Server you are running. For example, Windows Server 2008 R2 Web Edition supports far fewer server roles than Enterprise Edition and Datacenter Edition do.

Here is a list of the server roles that can be deployed on a core server that is running Windows Server 2008 R2 Enterprise Edition. The list is the same for Datacenter Edition. If you are interested in knowing which roles the other editions of Windows Server 2008 R2 support, you can find the full list from this website.

With that said, here is the list:

  • Active Directory Certificate Services
  • Active Directory Domain Services
  • Active Directory Lightweight Directory Service
  • BranchCache Hosted Cache
  • DHCP Server
  • DNS Server
  • File Services
  • Hyper-V
  • Media Services (this role must be downloaded separately)
  • Print Services
  • Web Services (IIS)

One caveat to the list above is that although server core does support Hyper-V, this article series has focused on using core servers as virtual machines. You cannot install the Hyper-V role on a virtual machine.

Deploying a Server Role

Now that you know which server roles are supported, I want to show you how to deploy a role. As you have already seen, the roles that can be installed varies from one edition of Windows Server to another. Since that’s the case, the best way to start is to verify that the Web Services role can be installed. To do so, enter the OCLIST command. When you do, Windows will return a list of every possible server role and role feature. As you can see in Figure B, this list will also tell you which (if any) roles have already been installed.

Figure B: The OCLIST command shows you which roles have been installed.

As you may have already guessed, the OCSETUP command is also used to install or remove roles and role services. Although technically not a requirement, it is widely considered to be a best practice to initiate role installation commands with Start /W. The reason for this is because Server Core does not let you know when a role installation has completed. Using Start /W causes the command prompt to be suppressed until the installation completes. That way, when the command prompt becomes available then you will know that the role has been installed. Of course you should always verify the installation by using the OCSETUP command.

In most cases, installing a server role involves following the OCSETUP command with the name of the role that you are installing. When you combine this technique with the Start /W command, the whole thing looks like this:

Start /W OCSETUP <role name>

Although this technique works for most of the role services, there are some exceptions. Most notably, you will have to use a different technique if you want your core server to act as a domain controller or a Web Server.

If you later decide to uninstall a server role, you can use almost the same technique. The only difference is that you must append the /Uninstall switch to the end of the command. Here is an example of what such a command might look like.

Start /W OCSETUP <role name>/uninstall

If you would prefer to see a real world example, then check out Figure C. In this figure, I am installing and then removing the DHCP server role.

Figure C: You can use the OCSETUP command to install and uninstall server roles.


In this article, I have shown you how you can deploy PowerShell, and I have also shown you a generic technique that you can use for deploying most of the available server roles. In Part 7, I want to wrap up the series by showing you some techniques for managing your core servers. I will also talk about some tips that you can use to get the most from the virtualization platform (Hyper-V) that is hosting your core servers.

If you would like to read the other parts in this article series please go to

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top