Microsoft IIS 10.0 – Creating an IIS 10.0 website on Nano Server

How to install and use docker on ubuntu 18.04

In this recipe, we’ll use PowerShell commands to connect to our Nano Server instance. We will import the IIS administration module and create a website. Finally, we will check the website’s status.

Getting ready

To step through this recipe, we are going to create a website in IIS 10.0 on Nano Server 2016 through PowerShell. IIS 10.0 on Nano Server can only be managed using PowerShell. You will need Nano Server 2016 with the IIS package installed. For all this installation and configuration work, you should have administrative privileges.

How to do it…

  1. Go to the WIN2016IIS server to connect to Nano Server 2016 through PowerShell. We have to first log in to the WIN2016IIS server or (a Windows Server 2016 or Windows 10 machine will do). We will use PowerShell to remotely connect to Nano Server This is the IP in my case, but it can be different in yours.
  2. Open PowerShell with administrative rights on the WIN2016IIS server. Press Windows + R key from your keyboard. You will get the Run window.
  3. Type the command RunAs /user:Administrator PowerShell_ISE.exE in the Run window and click on OK. Now it will ask you the administrator password of WIN2016IIS, so type in the password for WIN2016IIS and press Enter. You will see PowerShell open with administrative rights.
Have a look at the Installing IIS 10.0 on Nano Server recipe to learn how to run PowerShell.
  1. Let’s connect to Nano Server on We have to first set up our Nano Server instance as the trusted host for WIN2016IIS server. We will write the PowerShell command Set-Item WSMan:localhostClientTrustedHosts -Value -Concatenate and press Enter. You will get a pop-up to confirm the trusted host. Click on Yes. You have now finished the trusted host setup for Nano Server.
  2. Let’s now connect Nano Server. Run the PowerShell command Enter-PSSession –ComputerName "" -Credential ~Administrator to connect Nano Server. You will get the popup for the Nano Server administrator password, as shown here:
In the command –ComputerName "", substitute your IP address.
  1. You have to provide your Nano server password and press Enter. You will be logged in through PowerShell remotely.



  1. You are now connected to Nano Server through PowerShell. First, we have to run Import-module iisadministration and run the Import-module iisadministration command in PowerShell. It will import the iisadministrator module. This iisadministration module will provide us the full administration options of IIS Server.
  2. I am going to create a separate website directory called nonosite. This directory will be created inside C:\inetpubwwwroot.
  3. Open the file explorer on the WIN2016IIS server, type$ in the address bar. This is nothing but the Nano server IP address and the C: drive’s hidden default share, c$. You will get the Nano Server C: drive, as shown here:
  1. We go to C:\intepubwwwroot and create a folder called nanosite. If you are facing problems accessing the C: drive of Nano Server, you should check the firewall file and print share settings on Nano Server; you can use the PowerShell command to create a folder inside C:\inetpubwwwroot.



  1. Now we are going to create a website called Go to the PowerShell command prompt and run New-IISSite -Name -BindingInformation "*:8080:" -PhysicalPath c:\inetpub\wwwroot\nanosite. The website will be created.
  2. We can check whether the website has been created or not. Open the PowerShell command prompt and run Get-IISSite, as shown here:
  1. Once you run the Get-IISSite command in PowerShell, you will get all the listed websites available in the IIS server. Now we have two websites created in our IIS Server instance: Default Web Site and


How it works…

In this recipe, we used PowerShell commands to connect to Nano Server. We imported the IISadministration module and created a separate Nanosite folder inside C:\inetpub\wwwroot. We also created a website with PowerShell commands and checked the listed website’s details.

Comments are closed.