Windows Update via command line Server 2016 and Windows 10

To launch Windows updates via command line on Server 2016 and Windows 10 machines:

(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()

This is a Powershell command, the earlier CMD command line¬†wuauclt.exe /updatenow no longer works for these OS’s