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 1.0.1.0

Importing Module

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

 

 

1

 

2.PNG

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'

 

3.png

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 test.com /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 '192.168.0.10' -InterfaceNameOrIndex 'ethernet' -EnableRemoteManagementPort -Ipv4Dns '192.168.0.5' -Ipv4SubnetMask '255.255.255.0' -Ipv4Gateway '192.168.0.1' -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\Microsoft-NanoServer-FailoverCluster-Package.cab /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
Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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