This blog post was originally written by Shruthin Reddy.
The article describes about adding a Nano Server package to your existing Nano Server using the DISM command. Adding packages installs new roles and features to the operating system. As Nano Server doesn’t have a GUI all of these tasks have to be done through remote PowerShell Session. For demonstration purposes, I have installed “Microsoft-NanoServer-Containers-Package_en-US.cab” which enables the container role on my existing Nano Server.
1. From a management station, remotely connect to the C$ directory on Nano Server by typing '\\Servername\C$' or using the Nano IP address
2. Create a directory called “Packages” on the C: drive
3. Copy the required NANO feature package “Microsoft-NanoServer-Containers-Package_en-US.cab” from the Windows Server 2016 media to C:\Packages on Nano Server
4. PS remote into Nano Server from your management box using this command
Enter-PSSession -ComputerName $ip -Credential $ip\Administrator
5. Change the directory to C:\Packages (Directory where you have copied the Package on NANO image)
6. Use the command "Dism /online /add-package /packagepath:c:\packages\Microsoft-NanoServer-Containers-Package_en-us.cab" to install package
7. Restart the system using the "shutdown /r" command after the installation is completed
This method is mainly useful in a scenario where you don’t have direct internet connectivity on your Nano instances to download the packages from the Microsoft repository. If you have internet access and want to download the packages from Microsoft repository and install it please follow the Getting Started with Nano Server blog which explains all the alternative deployment methods.