Windows Server 2016

How to install and configure Nano Server 2016 in Windows Server 2016

How to install and configure Nano Server 2016 in Windows Server 2016

In this post, we’ll learn the steps to install and configure Nano Server 2016 in Windows Server 2016. With Windows Server 2016 Microsoft introduced Nano Server. Nano Server 2016 is a minimal footprint option announced by Microsoft. It gives an option to deploy only those packages that are required instead of installing all the packages and services.

How many of us are using all the components and services that are available in Windows Server 2016. No one, even if we want those services, we deploy new Server and enable Roles and Features on that Server. Some of the other concerns of Administrators are:

Why shall I reboot a Server because of patching a component that I never used?
Server image is too big and require good amount of storage.
Large images take long time to install and configure.
Transferring images takes good amount of time and network bandwidth.

Microsoft has released Nano Server 2016 as a solution to all the above mentioned concerns. Now you only need to install the package (component) that you want to use in your environment. It would make an image of small footprint. But the only drawback is that you can’t RDP (Remote Desktop) to the server however you can manage the server using PowerShell and WMI.

Steps to install and configure Nano Server 2016

Step 1
To install and configure Nano Server 2016 we need to copy some of the files from Windows Server 2016 ISO image to local Server. Create a folder with the name of PowerShell in C:. Map the ISO of Windows Server 2016 to D: and then copy the contents from D:\NanoServer\NanoServerImageGenerator(assuming D is the DVD drive) to C:\PowerShell folder. This would copy three files to C:\PowerShell folder i.e. Convert-WindowsImage.ps1, NanoServerImageGenerator.psd1, NanoServerImageGenerator.psm1.

install Nano Server 2016 (1)

Step 2:
Run PowerShell as an Administrator and run the command “Set-ExecutionPolicy RemoteSigned” to change the execution policy.
The execution policy helps protect from scripts that you do not trust. Click on “Yes to All” to change the execution policy.

Step 3:
Run the command “Import-Module .\NanoServerImageGenerator.psm1 -verbose” to import the required files.

install Nano Server 2016 (1)

Step 4:
Run the New-NanoServerImage command to create the new VHD file. This command would convert the Image to Virtual HarDisk and then add packages in the HardDisk. This command requires multiple switches.

New-NanoServerImage -DeploymentType Guest -Edition Standard -TargetPath C:\NanoServer\Nano01.vhd -BasePath C:\NanoServer -ComputerName Nano01 -MediaPath D:\ -Packages Microsoft-NanoServer-DNS-Package,Microsoft-NanoServer-IIS-Package

install Nano Server 2016 (1)

Let’s understand switches in detail:

DeploymentType: Define if you want Guest or Host
Edition: Resulting Virtual HardDisk would contain Standard version of Windows Server 2016
TargetPath : This path is where you want Virtual HardDisk to be created.
BasePath: This path is optional, it defines the path where you can save Nano Server WIM and Packages.
ComputerName: Specify the Computer name of Virtual Machine that we are created.
MediaPath: Path of Windows Server 2016 DVD. This is to define the root path and not the path of nested files and folders.
Packages: Specify all the packages that you want to install. For this practical, we’ll install Microsoft-NanoServer-DNS-Package for DNS and Microsoft-NanoServer-IIS-Package for IIS.

Step 5:
New VHD file named Nano01.vhd would be created in the folder C:\NanoServer. You can review the logs if you need more information.

install Nano Server 2016 (1)
install Nano Server 2016

Hope you understood the steps to install and configure Nano Server 2016 on Windows Server 2016. Please feel free to leave your comments and suggestions in the comment section.