The system template Install updates, restart only if needed first restarts the device if a restart is pending, then installs the missing Windows updates and takes a full inventory. You find it in the Toolbox under System templates.
notion image
  • Restart after (minutes): how long the message counts down before the restart.
  • Message before the restart: shown to whoever is signed in; $Minutes is the time left. Leave it empty to restart without a message.
Below, you see the actions it adds: an if on rebootRequired with Send Windows message and Reboot, then Search Windows Updates, Install Windows Updates, another search and Full inventory. Add 7 actions puts them into the task.
notion image
💡
A system template is added as a copy: you can change its actions afterwards, and later versions of the template don't change them.