With the addition of .NET Framework to Server Core in Windows Server 2008 R2 the Server Core installation option became even more appealing for those who want to use a very low footprint server for hosting their applications. Availability of .NET framework provides the following great benefits:
- ASP.NET support – you can now use Server Core to host your ASP.NET applications.
- IIS Remote Management – Server Core does not provide any user interface other than command line. But if you prefer to use IIS Manager UI to administer IIS, you can now use IIS Remote Manager to connect to IIS on Server Core and perform all the management tasks from within familiar UI of IIS Manager.
- PowerShell – Windows Server 2008 R2 includes IIS PowerShell snapin, which is also available on Server Core.
This post describes how to setup and configure IIS on Server Core in Windows Server 2008 R2. Specifically the following tasks are described:
- Using oclist and ocsetup commands
- Basic Installation of IIS
- Installing ASP.NET
- Installing PowerShell and IIS snap-in
- Enabling IIS Remote Management
Using oclist and ocsetup commands
oclist command can be used to list the available and installed roles and services on the server. The output of the command looks similar to below:

It is important to understand how oclist renders component dependencies. For example, in the above screenshot the oclist output shows that IIS-FTPExtensibility is dependent on IIS-FTPSvc, so in order to install IIS-FTPExtensibility it is first necessary to install IIS-FTPSvc.
ocsetup command can be used to install and uninstall individual roles and services.
Basic Installation of IIS
To perform basic and default installation of IIS on Server Core run the following command:
start /w ocsetup IIS-WebServerRole
After the command has run you can run oclist | more and check which IIS components have been installed.
Installing ASP.NET
To install ASP.NET on Server Core run the following commands in exact same order as listed below:
start /w ocsetup WAS-NetFxEnvironment
start /w ocsetup IIS-ISAPIExtensions
start /w ocsetup IIS-ISAPIFilter
start /w ocsetup IIS-NetFxExtensibility
start /w ocsetup IIS-ASPNET
Installing PowerShell and IIS snap-in
First, install the PowerShell by running the command as below:
start /w ocsetup MicrosoftWindowsPowerShell
Next, launch the PowerShell by running this command:
\windows\system32\WindowsPowerShell\v1.0\powershell.exe
After running this command you should see a PowerShell prompt. Type the following to import IIS snapin:
import-module WebAdministration
After that you can get the list of available IIS cmdlets by typing
get-command –pssnapin WebAdministration
Refer to the article Managing IIS with IIS 7.0 PowerShell Snap-in for more information.
Enabling IIS Remote Management
First install the IIS management service by executing this command:
start /w ocsetup IIS-ManagementService
Then enable remote management by running this command:
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WebManagement\Server ^
/v EnableRemoteManagement /t REG_DWORD /d 1
And finally start the management service:
net start wmsvc
Now you can connect to the IIS on the Server Core from a remote machine by using IIS Remote Manager.
Acknowledgement: thanks to Saad Ladki and Thomas Deml from IIS team for explaining to me all these steps.
Read the complete post here