You can write the following:
Restart-Computer -ComputerName localhost
Just search the AutoSPInstallerFunctions.ps1 and place that line where you want it to restart. As Brian indicated, you may just need a "Start-Sleep 5" instead of restarting.