Perform instructions below at your own risk:
To automate windows update these instructions may or may not work for your system however it appears to work to an extent for Windows 7 as these instructions were tested on Windows 7.
MUST READ: 1. If the step below does not work verify then you are most likely part of a domain and your security policy may not allow you to perform steps below! 2. UAC prompts were also disabled for the duration of the windows updates so the batch files can run without interruption; be careful to restore this to default when done
Caution this step will make your computer less secure, immediately remove this after your computer is completely up to date. Set a reminder for 24 hours later if need be:
1.
First you will have to make sure your computer automatically logs into a user. You can do this by clicking start menu, type "netplwiz", press enter or open the wizard, under the users tab, select your username, and un-check "require password", type your password, close this window.
2.
Create 3 batch files to start the automated process. (Open notepad paste each code into a separate notepad and perform a save as corresponding_file_name.bat)
One. Save as: any_name.bat then copy this batch file to your startup folder for the user you made auto login. (Click start > All Programs > Startup)
start "" c:\autoupdate1.bat
exit
Two. Save as: autoupdate1.bat then copy this to C:\ drive
wuauclt /detectnow
wuauclt /updatenow
reg query "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" > nul && shutdown -r -t 0
start "" c:\autoupdate2.bat
exit
Three. Save as: autoupdate2.bat then copy this to C:\ drive
ping 127.0.0.1 -n 61 > nul
start "" c:\autoupdate1.bat
exit
Restart or open the batch file in the startup folder and watch the magic begin!
3.
When it is completely done updating just delete the batch files from the startup folder & c:\ drive
Once again follow these instructions at your own risk as it can create an endless loop if you do not know how to stop this process by removing it from the startup folder or going into windows under safe-mode to remove the batch files
Final notes: If you run into issues running the batch files chances are you may have to look up how to disable UAC prompts for your Windows version
You could try the following, I've not got a nano server to try it out on. Drop the select
if it gets you something else and see if what you want is stored under a different property in Server 2016 Nano
Get-CIMInstance -ClassName Win32_OperatingSystem -Property * | select caption
When tested on a real Nano instance the -session parameter was not needed, but if you need it at some future date, here's the variant with -session:
$cuser = "Your username"
$cservername = "Your Servername"
$csession = New-CimSession –Credential $cuser –ComputerName $cservername
Get-CIMInstance –session $csession -ClassName Win32_OperatingSystem -Property * | select caption
Best Answer
I suggest identifying exactly which updates are dependencies for Docker to work properly, and verifying those are installed specifically. It's surprisingly hard to emulate the "Check for Updates" button in PowerShell.
These are the built in commands, but they aren't documented and are just wrappers for WMI method calls.
Documentation Team issue discussing lack of documentation https://github.com/MicrosoftDocs/windows-powershell-docs/issues/139
PowerShell Team issue discussing the broken functionality https://github.com/PowerShell/PowerShell/issues/5718
This person seems to have figured out how to use the commands. https://richardspowershellblog.wordpress.com/2017/11/17/windows-update-change-in-server-1709/