I recommend using the PSWindowsUpdate powershell module. It allows you to ignore reboots.
Import-Module PSWindowsUpdate
Get-WUInstall -AcceptAll -IgnoreReboot
If you get error "The specified module 'PSWindowsUpdate' was not loaded because no valid module file was found..." you may need to download and install it with this script.
$webDeployURL = "https://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc/file/41459/43/PSWindowsUpdate.zip"
$filePath = "$($env:TEMP)\PSWindowsUpdate.zip"
(New-Object System.Net.WebClient).DownloadFile($webDeployURL, $filePath)
$shell = New-Object -ComObject Shell.Application
$zipFile = $shell.NameSpace($filePath)
$destinationFolder = $shell.NameSpace("C:\Program Files\WindowsPowerShell\Modules")
$copyFlags = 0x00
$copyFlags += 0x04 # Hide progress dialogs
$copyFlags += 0x10 # Overwrite existing files
$destinationFolder.CopyHere($zipFile.Items(), $copyFlags)
# Clean up
Remove-Item -Force -Path $filePath
Import-Module PSWindowsUpdate