I have been using the get-pendingreboot option for a while, before it was incorporated in the main script I used it as an extension using a script from Microsoft.
Works well too and gives users 8 hours before it reboots:
If($IsSystemRebootPending -eq $True){
Show-InstallationRestartPrompt -CountdownSeconds 28805 -CountdownNoHideSeconds 60
Exit-Script -ExitCode 1618
}
You could either simply add this to your deploy scripts or at the end of the get-pendingreboot function (what I have been doing).