Following my Nano Server coverage I decided to write another post about Nano Server, this time I will show you how to Install IIS Server on a Nano Server.
Note: If you are using TP5 build you could Install IIS using the online Installer without using DISM Install IIS Server On Nano Server Using The New Online Install
For other Nano Server Role Installation see:
- How To Install Hyper-V On Windows Nano Server 2016
- Install DNS Server On Windows Nano Server 2016 TP5
- Deploy File Server On a Window Nano Server 2016 TP5
- Setup Nano Server 2016 As A Container Host
To start open the Windows Server 2016 ISO Image and copy the folder Packages located Inside the NanoServer folder to the same folder you exiting Nano Server VHD file located.
This is how to NanoServer folder content looks like.
Below Is the Packages folder
In my case I’m copying it my Nano05 VM folder location.
Next I need to load the IIS package using the dism command below:
dism /mount-image /imagefile:.\nano05.vhd /index:1 /mountdir:.\mountdir
Run the command below to load the IIS package.
dism /add-package /packagepath:.\packages\microsoft-nanoserver-iis-package.cab /image:.\mountdir
And the language file.
dism /add-package /packagepath:.\packages\en-us\microsoft-nanoserver-iis-package.cab /image:.\mountdir
Unmount the VHD and commit changes.
dism /unmount-image /mountdir:.\mountdir /commit
Start the VM
Next Connect the Nano Server:
Set-Item WSMan:\localhost\Client\TrustedHosts -Value 192.168.100.20 -Concatenate
Enter-PSSession -ComputerName 192.168.100.20 -Credential Administrator
Import IIS module:
Import-module iisadministration
Create a new site using the cmdlet below:
New-IISSite -Name "Nanosite" -bindingInformation "*:80:" -PhysicalPath c:\inetpub\wwwroot\
I also created a DNS record for the site
All done, If I browse to http://nanosite.test.local
For more PowerShell cmdlets visit: