Patch Nano Server
Find out the patch options for Nano Server
December 3, 2016
Q. How do I patch Nano Server?
A. For a regular Windows installation patching is possible through the Update option and even with Server Core the sconfig menu can be used to trigger an update cycle. For Nano Server there is no Update utility or sconfig menu to trigger the patching. One option is to use Server Management Tools which is the Azure-based management tool which has an update option.
The other option is by triggering PowerShell commands remotely to look for updates and install them from Windows Update:
Enter-PSSession -ComputerName NanoVM#Look for updates$ci = New-CimInstance -Namespace root/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperationsSession $result = $ci | Invoke-CimMethod -MethodName ScanForUpdates -Arguments @{SearchCriteria="IsInstalled=0";OnlineScan=$true}$result.Updates#Install updatesInvoke-CimMethod -InputObject $ci -MethodName ApplyApplicableUpdatesRestart-Computer; exitEnter-PSSession -ComputerName NanoVM#View installed updates$ci = New-CimInstance -Namespace root/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperationsSession$result = $ci | Invoke-CimMethod -MethodName ScanForUpdates -Arguments @{SearchCriteria="IsInstalled=1";OnlineScan=$true}$result.Updates
If you have the cumulative update downloaded you can copy it to the Nano instance then install it:
$s = New-PSSession -ComputerName NanoVMCopy-Item -ToSession $s -Path C:ServicingPackages_cabs -Destination C:ServicingPackages_cabs -RecurseEnter-PSSession $sAdd-WindowsPackage -Online -PackagePath C:ServicingPackages_cabsWindows10.0-KB3200970-x64.cabRestart-Computer; exit
If you receive a disk space error increase the size of the VHD from the default 4 GB.
About the Author
You May Also Like