Managing Nano Server

Posted: December 11, 2016 in Windows Server

Installing roles and features online

Finding modules online:

Save-Module -Path "$Env:ProgramFiles\WindowsPowerShell\Modules\" -Name NanoServerPackage -MinimumVersion

Importing Module

cd 'C:\Program Files\WindowsPowerShell\Modules\NanoServerPackage\'
Set-ExecutionPolicy Unrestricted
Import-PackageProvider .\NanoServerPackage.psm1
Find-NanoServerPackage | ft -wrap






Now we can install needed package,in example below i installed Storage Package

Install-NanoServerPackage -Name 'Microsoft-NanoServer-Storage-Package' -MinimumVersion 10.0.14393.0 -Culture en-us -ToVhd 'C:\nano\nano_server.vhd'



Editing existing Nano Server

With Edit-NanoServerImage cmdlet we can:

— Add packages.
— Add drivers.
— Set the computer name.
— Set the administrator password.
— Join a domain.
— Enable debugging.
— Enable Emergency Management Services (EMS).
— Set the static IP address.

In This example we’ll add Nano Server to AD Domain

In Domain joined computer or DC run

djoin.exe /provision /domain /machine nano-01 /savefile c:\nano.djoin

Now we can join Nano Server to the domain:

Edit-NanoServerImage -TargetPath C:\nano\nano_server.vhd -Ipv4Address '' -InterfaceNameOrIndex 'ethernet' -EnableRemoteManagementPort -Ipv4Dns '' -Ipv4SubnetMask '' -Ipv4Gateway '' -DomainBlobPath 'C:\nano.djoin'

Alternative way of editing Nano Image using Dism.exe

dism.exe /Mount-Image /ImageFile:c:\nano\nano_server.vhd /index:1 /mountdir:c:/mountdir
dism.exe /add-package /packagepath:d:\nanoserver\packages\ /image:c:\mountdirm.exe /Mount-Image /ImageFile:c:\nano\nano_server.vhd /index:1 /mountdir:c:/mountdir
dism.exe /unmount-image /mountdir:c:\mountdir /commit

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s