In this part I will show you how you can update Nano server and Nano Server Package Provider.

Connect to your Nano Server:

Enter-PSSession -ComputerName <nanoservername>

Next we need to do is to receive the full list of applicable updates:

$session = New-CimInstance -Namespace root/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperationsSession

screens-2

 

Next command is

$scanResults = Invoke-CimMethod -InputObject $session -MethodName ScanForUpdates -Arguments @{SearchCriteria=”IsInstalled=0″;OnlineScan=$true}

screens-3

Let’s download and install all applicable updates by running:

$session = New-CimInstance -Namespace root/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperationsSession

$scanResults = Invoke-CimMethod -InputObject $session -MethodName ApplyApplicableUpdates    (It will take some time so be patient!!!!)

Once done, Restart nano server by running Restart-Computer

screens-1

To verify type in

Get-WindowsPackage –Online

screens-2

How to update Package Provider

To update Nano Server Package Provider Module run

Update-module nanoserverpackage

screens-3

Cheers,

Nedim