With Server 2016 TP5 available today, we want to test it by ourselves.
First; how-to deploy a Nano server image.
Download the server 2016 ISO and mount it.
- Launch PowerShell as Administrator.
- Copy Nano server folder with the following command:
1Copy-Item -Path E:\NanoServer\ -Destination C:\NanoServer\ -Recurse - Import the PowerShell module for building the the image with the following command:
12Set-Location –Path C:\NanoServerImport-Module .\NanoServerImageGenerator\NanoServerImageGenerator.psd1
- Run command
1Show-Command New-NanoServerImage
Gives a GUI where you can give the parameters for deploying the nano server VHD.
* Note: When you select other roles you must use the -Mediapath variable to the ISO.
** Note: AdministratorPassword must be a secure string. In the GUI Password field: (ConvertTo-SecureString -String “YourPassword” -AsPlainText -Force)
In order to automate things you can also do it by hand:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
#Example usage for virtual nano server Import-Module D:\NanoServer\NanoServerImageGenerator\NanoServerImageGenerator.psd1 $NanoHash = @{ Compute = $True Clustering = $True EnableRemoteManagementPort = $True Container = $True AdministratorPassword = (ConvertTo-SecureString -String "Welkom01" -AsPlainText -Force) DeploymentType = "Guest" Edition = "Datacenter" Computername = "NANO01" MediaPath = "E:\" BasePath = "D:\NanoServer\" TargetPath = "D:\NanoServer\NANO01.vhdx" DomainName = "contoso.com" IPv4Address = "192.168.1.10" IPv4SubnetMask = "255.255.255.0" IPv4Gateway = "192.168.1.1" InterfaceNameOrIndex = "Ethernet" } New-NanoServerImage @nanoHash |