Open PowerShell as Admin and run:
Mount your Windows Server 2016 ISO and copy \NanoServer\ folder to C:\Nano .
# Import Nano module Import-Module "C:\Nano\NanoServerImageGenerator\NanoServerImageGenerator.psm1" New-NanoServerImage -MediaPath "D:" -TargetPath "C:\Nano\Nano.vhdx" -ComputerName "NanoPC" -Package Microsoft-NanoServer-Compute-Package -AdministratorPassword (ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force)