Windows OS Hub
  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange

 Windows OS Hub / Windows Server 2016 / Package Management in Nano Server 2016

September 8, 2017 Windows Server 2016

Package Management in Nano Server 2016

In Windows Server 2016, in addition to familiar Server Core and Full GUI, there is another installation option called Nano Server. Nano Server is a more compact version of Windows Server installation designed to run cloud containers and apps. To reduce the size of the system, all roles, components and drivers are taken out of the Nano Server image. You can download and install them as packages. You can get these packages from Windows Server 2016 distribution image (..\Nano Server\Packages), or from the online package repository. In this article we’ll talk about the peculiarities of package management in Windows Nano Server 2016.

Nano Server Packages can be compared to Windows Server roles and components that can be installed by an administrator if necessary. You can install a package in the Nano Server image from a host system during deployment (using New-NanoServerImage cmdlet), when editing the image (Edit-NanoServerImage), or using DISM or PackageManagement module (aka OneGet).

Nano Server packages

Connect to a deployed Nano VM from a Hyper-V host:

Enter-PSSession Nano1

Download and import NanoServerPackage module for  PowerShell:

Save-Module -Path “$env:ProgramFiles\WindowsPowerShell\Modules” -Name NanoServerPackage -MinimumVersion 1.0.0.0
Import-PackageProvider NanoServerPackage

install-PackageProvider -NanoServerPackage

Display the list of available Nano Server packages as follows:

find-NanoServerPackage -Name *

Or using a more general command:

Find-Package -ProviderName NanoServerPackage

Find-Package -ProviderName NanoServerPackage

To install a package (e. g., a storage component package — Storage Package) on a running Nano Server, run this command:
Install-NanoServerPackage -Name Microsoft-NanoServer-Storage-Package

Install-NanoServerPackage -Name Microsoft-NanoServer-Storage-Package

To install and start IIS services from PowerShell, the installation command will look like this:

Install-Package -ProviderName NanoServerPackage -Name Microsoft-NanoServer-IIS-Package
Start-Service WAS
Start-Service W3SVC

You can install a Nano package offline directly into the VHD/VHDX file of a virtual machine:

Install-NanoServerPackage -Name Microsoft-NanoServer-Storage-Package  -culture en-us -RequiredVersion 10.0.14300.0 -ToVHd C:\VMstore\nano1\Nano1.vhd

The latest version of a Nano package can be downloaded from the official repository and added to the list of available packages:

Find-NanoServerPackage -Name *Storage* -MaximumVersion 10.2 -MinimumVersion 1.0 -Culture en-us | Save-NanoServerPackage -Path C:\NanoBase\Packages

You can get the list of the installed packages in the system online using this command:

Get-Package

Get-Package

Or in offline mode based on the data in the VHD file of Nano VM image:

Get-Package -provider NanoserverPackage -fromVhd C:\VMstore\nano1\Nano1.vhd

If the host machine and Nano Server are not connected to the Internet, you can add a component to the system image from a CAB file using DISM:

dism.exe /Mount-Image /ImageFile:C:\VMstore\nano1\Nano1.vhd /index:1 /mountdir:c:\mountdir
dism.exe /add-package /packagepath:c:\nanoserver\packages\Microsoft-NanoServer-IIS-Package_en-US.cab /image:c:\mountdir
dism.exe /unmount-image /mountdir:c:\mountdir /commit

0 comment
0
Facebook Twitter Google + Pinterest
previous post
How to Check Trusted Root Certification Authorities for Suspicious Certs
next post
Fix: Server Stuck on “Preparing to Configure Windows”

Related Reading

How to Sign a PowerShell Script (PS1) with...

February 25, 2021

How to Shadow (Remote Control) a User’s RDP...

February 22, 2021

Configuring PowerShell Script Execution Policy

February 18, 2021

Configuring Proxy Settings on Windows Using Group Policy...

February 17, 2021

Updating Group Policy Settings on Windows Domain Computers

February 16, 2021

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange
  • Windows 10
  • Windows 8
  • Windows 7
  • Windows Server 2016
  • Windows Server 2012 R2
  • Windows Server 2008 R2
  • PowerShell
  • VMWare
  • MS Office

Recent Posts

  • Accessing USB Flash Drive from VMWare ESXi

    February 26, 2021
  • How to Sign a PowerShell Script (PS1) with a Code Signing Certificate?

    February 25, 2021
  • Change the Default Port Number (TCP/1433) for a MS SQL Server Instance

    February 24, 2021
  • How to Shadow (Remote Control) a User’s RDP session on RDS Windows Server 2016/2019?

    February 22, 2021
  • Configuring PowerShell Script Execution Policy

    February 18, 2021
  • Configuring Proxy Settings on Windows Using Group Policy Preferences

    February 17, 2021
  • Updating Group Policy Settings on Windows Domain Computers

    February 16, 2021
  • Managing Administrative Shares (Admin$, IPC$, C$, D$) in Windows 10

    February 11, 2021
  • Packet Monitor (PktMon) – Built-in Packet Sniffer in Windows 10

    February 10, 2021
  • Fixing “Winload.efi is Missing or Contains Errors” in Windows 10

    February 5, 2021

Follow us

woshub.com
  • Facebook
  • Twitter
  • RSS
Popular Posts
  • SMB 1.0 Support in Windows Server 2012 R2 / Windows Server 2016
  • User Profile Disks on Windows Server 2012 R2 / 2016 RDS
  • “Downloading updates 0%” Issue on Windows Server 2016 and Windows 10
  • Configure Storage Spaces Direct (S2D) on Windows Server 2016
  • Windows XP Can’t RDP to Windows 10 / Server 2012R2/2016 RDS
  • Create a Bootable USB Flash Drive for Installation Windows Server 2016
  • Remote IIS Management in Windows Server 2016/2012 R2
Footer Logo

@2014 - 2018 - Windows OS Hub. All about operating systems for sysadmins


Back To Top