Microsoft IIS 10.0 – Uploading and testing web pages in a virtual directory

How to find files and file listing on ubuntu

In this recipe, we will log in to Nano Server remotely. We will use PowerShell and check our created sites. We will access the Nano Server C$ share to upload our web pages. We will test the NanoAspNet website on port 8000 and also test the MyApp virtual directory.

Getting ready

To step through this recipe, you will need a Windows Server 2016 virtual or physical server for remote PowerShell management and configuring virtual directory on Nano Server 2016. For all this installation and configuration work, you should have administrative privileges.

How do to it…

  1. Log in to Windows Server 2016. The IP is and the name of the server is WIN2016IIS. Press Windows + R. You will get the Run window. We have to open PowerShell ISE with administrative rights. Type RunAs /user:Administrator PowerShell_ISE.exe in the Run window and press OK.
  2. Now it will ask you the administrator password for your Windows Server 2016 (not Nano Server) machine. Type the password and press Enter. You will get the PowerShell window.
  3. Now you have to remotely connect to Nano Server 2016 using the IP Run the following command in PowerShell:

      "Enter-PSSession –ComputerName "" -
      Credential ~\Administrator"
  1. Now you will get a popup window for the Nano Server administrator account password. Enter the password and press OK to log in. You’ll have connected successfully.



  1. Now run Import-module iisAdministration in PowerShell and press Enter. This will import the IISAdministration PowerShell module.
  2. Run the command Get-IISSite on the remote-connected PowerShell window, as shown here:
  1. You can see here that we get a list of websites that we’ve already created in Nano Server. Let’s upload the HTML web pages, which are already available.
  2. Go to Windows Server 2016, Open the Run window, and type the UNC path of Nano Server, \\\c$\inetpub\wwwroot, and press OK. You will get the username/password window of Nano Server. Provide the username and password and press OK. Now you will get the wwwroot folder of Nano Server, as shown here:
  1. Inside the wwwroot folder, we have the MyApp virtual directory folder and the IISstart.htm and iisstart.png files. The iisstart files are used for NanoAspNet at http://172.16.1563:8000. Open the MyApp folder, as shown here:
  1. You can see in the MyApp virtual directory folder that we have a file called index.htm:
  1. Let’s open the virtual directory on Nano Server and browse to, as shown here:
  1. You can see that we get access to the virtual directory’s content.

How it works…

In this recipe, we logged on to Nano Server remotely using PowerShell. We used PowerShell to check our created sites and access the Nano Server C$ share to upload our web pages. We tested NanoAspNet on port 8000, and we tested the MyApp virtual directory.


Comments are closed.