How To Use PowerShell With Windows Nano Server 2016 Version 1709 Image

In this blog post, I’ll show you how to use PowerShell Core 6.0 With Windows Nano Server 2016 Version 1709.

Nano Server

With the release of Windows Server 2016 Version 1709, Nano Server Is now a Container only operating Image with a total size of 80MB.

One of the reasons Nano Server is only 80MB is because It’s no longer has PowerShell and .NET loaded into the OS.

However, What if you do need PowerShell in your Container Image?

Solution

For this reason, Microsoft is developing and working on PowerShell Core 6.0 which comes without the .NET framework and is scheduled to be released later this year.

And for now, we can use it on Nano Server 2016 Version 1709 very easily.

Nano Server And PowerShell Image

To use PowerShell on Nano Server we need to use the PowerShell 6.0 Container Image and tell it to use Nano Server 2016 1709 Image.

Below, I’ll use the docker command to download PowerShell with Window Nano Server 1709.

docker pull microsoft/powershell:6.0.0-beta.9-nanoserver-1709

Once Download I can see it available with the 6.0.0-beta.9-nanoserver-1709

To start a Container with Windows Nano Server 2016 Version 1709 and PowerShell 6.0 I use the command below:

docker run -it microsoft/powershell:6.0.0-beta.9-nanoserver-1709

And If run the command below inside the container it will show me the 1709 build number

[environment]

::OSVersion.Version

PowerShell Core Image

If you visit the PowerShell Image on Docker Hub you will see that now it can be installed on all platform like Linux, Windows, etc using the same method I used in this article to install it on 1709.

About Windows Server 2016 1709

First announced a five months ago, Windows Server 2016 version 1709 released as a Semi-Annual Channel with 18 months support (more details below).

Long and Semi-Annual Channel

As Announced a few months ago, Windows Server will be available in two release modules.

  1. Long-Term Servicing Channel – This Is the current and most familiar module where a new operating system version is released every 2-3 years with 5 years support cycle.
  2. Semi-Annual Channel – This new module will offer two new releases every year with new features and roles, support will be available for 18 months.

     

The Semi-Annual Channel will only be available for Volume Licensing customers with Software Assurance.

If you don’t have Software Assurance you can use Microsoft Azure where it’s available.


Posted

in

,

by