IIS Core

Configure Server Core for IIS Remote Management

Posted on

Everyone’s familiar by now with reasons why you want to use Server Core Edition for things like IIS, DNS, etc. In a recent project I found an interesting scenario where my GUI management server couldn’t connect remotely to the IIS instance that I was running on Server 2016 Core. There are a few oddities, so I decided to blog about it – let’s get going.

TL;DR steps are as follows:

  • Install IIS Web Role
  • Install IIS Management Feature
  • Change Registry Setting for Remote Management
  • Set Management Service to start automatically
  • Connect
  • Work
  • Get a promotion
  • Get a raise
  • Get a boat

Maybe not the boat, but that’s the dream right? Anyways, here’s the nitty gritty.

 

First, we need to see if IIS is installed. Assumedly because you’re already trying to figure out how to connect to it you’ve already done this. It’s good to check anyways, just to be sure. Note that in server core it first drops you into a cmd shell. This is 2017 and everything is done in powershell now, so go ahead and launch yourself into a PS shell. Then, we’ll check if the feature is installed by running the following command

Get-WindowsFeature | Where-Object {$_.DisplayName -eq “Web Server (IIS)”}

 

Here we can see that IIS is in fact not installed, so let’s go ahead and fix that. While we install IIS, it’s also important to install the IIS Remote Management Feature as well. Otherwise, there will be no connecting remotely to the instance. I’m installing both on the same line, using the following command.

Install-WindowsFeature Web-Server, Web-Mgmt-Service

 

It shouldn’t take too long. When it’s done you’ll get your output showing it’s complete.

 

Now that everything is installed, there is actually a registry key that needs modified. RegEdit is able to launch from Server Core from the command line, and you’ll need to set the following key to “1” rather than the default setting of “0”.

HKLM\SOFTWARE\Microsoft\WebManagement\Server\EnableRemoteManagement

 

Right, now we’ve got the settings in place. Unfortunately things still don’t work. That’s because the IIS Remote Management Service is disabled by default. Let’s go ahead and fix that by setting the service startup type to “automatic”, starting the service, and querying it’s state to confirm. We will do that by using the following three commands.

Set-Service WMSVC -StartupType “Automatic”

Start-Service WMSVC

Get-Service WMSVC

 

The status is now running, so we should be good to go. Let’s give it a shot by going into the GUI management server, launching the IIS console, and connecting to the server core box.

 

It will prompt you for the server name, and a user/password combo. After which, everything should be all set!

 

 

So there you have it, we’ve configured all the required settings to remotely manage IIS on server core!

I hope this makes your day at least a little bit easier.

Thanks,