In this blog post about Windows Server Containers, I will show you how I connect to Microsoft IIS Server running inside Windows Server Core Container from a management machine with IIS 10 console.
One of the most popular usages of Windows Containers is using it as a Web Server for front end applications and sometimes you might need to get visibility to IIS from the IIS console and not from PowerShell.
In my current environment, I have Windows Server Core with IIS running as a Container.
My Container host is running Windows Server 2016
To get this done, I will create a Container with port 80 and 1872 open, port 80 is for IIS and port 1872 is the IIS Server management port.
To create my Windows IIS web server container I will run the docker command below.
docker run -it --name webapp -p 80:80 -p 1872 microsoft/iis:latest
After the container has been created, I will run the PowerShell cmdlets below inside the container.
The cmdlet below will install IIS
The 2nd cmdlet will enable IIS
Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WebManagement\Server -Name EnableRemoteManagement -Value 1
The 3rd cmdlet will create a local user and set his password
net user simon "PASSWORD" /add
The 4th cmdlet will add the local user to the Administrators group (This step is very important)
Add-LocalGroupMember -Group administrators -Member simon
And finally, restart the service below
And finally, I will grab the IP address of my container by typing ipconfig
On my management machine, I will open my the IIS console -> right-click -> Connect to a Server
In the Server name, I will type the Container IP address
And type the username and password on the Newley created user
And done, I can see all the sites that are running on my IIS container and I can also make changes
2 responses to “Connect to a Windows Container Using IIS Management Console”
Hi I followed the instructions above, but when i try to connect to the remote server, i get “Unable to connect to the remote server”.
nice article! any chance this works on host of Win10?