Deploy TP5 Nano Server

Deploy Nano Server with TP5 and see whats different from TP4

John Savill

May 13, 2016

2 Min Read
Deploy TP5 Nano Server

Q. How do I deploy a Nano Server VM with Windows Server 2016 TP 5?

A. The PowerShell for deployment of a Nano Server VM has changed from TP 4 and now includes the ability to integrate your own unattend answer file instead of manually adding content to the default unattend answer file that was using in TP4. Microsoft has full documentation at https://technet.microsoft.com/en-us/library/mt126167.aspx however below are the key steps for common configurations.

Firstly copy the content of the NanoServerImageGenerator folder to your local machine (I placed the content in a folder names d:NanoTP5) then load the module using:

Import-Module 'D:NanoTP5NanoServerImageGenerator.psm1'

In my scenario the machine I am running this on is part of the domain I wish to join the Nano VM to so it can create the blob required for domain join. I also create a variable with the password I wish to use for the administrator account. I also created an unattend.xml file which sets the time zone which is listed below:

Central Standard TimeTo use this content and create the Nano VM VHD I use:$adminPass = ConvertTo-SecureString "Pa55word" -AsPlainText -Force$NanoVHDPath = ".NanoServerVM.vhd"New-NanoServerImage -MediaPath 'S:OS ImagesWindows Server 2016 TP5Expanded' `-BasePath .Base -TargetPath $NanoVHDPath -ComputerName NanoVM `-DeploymentType Guest -Edition Standard `-Storage -Defender -EnableRemoteManagementPort `-Packages Microsoft-NanoServer-DSC-Package `-UnattendPath .unattend.xml `-AdministratorPassword $adminPass -DomainName savilltech -ReuseDomainNodeIn the example above it uses the Standard edition of Nano server (-Edition Standard), adds the storage and Defender packages, enables remote management and desired state configuration. It also sets the image as a VM (-DeploymentType Guest). The created VHD can then be used with a Generation 1 VM (if you want Generation 2 use VHDX as the VHD type).

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like